Maybe you can do something like this with .htaccess
file.
You can redirect every page to your index.php
page
<IfModule mod_rewrite.c>
RewriteEngine On
DirectoryIndex index.php
RewriteBase /
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-l
RewriteRule . /index.php [L]
</IfModule>
And then you can handle your domain in your php
file:
<?php
/*
Example URL
$url = www.maydomain/articles/querystring/articles/xyz/param2/value2/param3/value3
$url = $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI'];
*/
$url = "www.maydomain/articles/querystring/articles/xyz/param2/value2/param3/value3";
$url = explode("/querystring/", $url);
/*
Where $url[0] is (www.maydomain/articles),
and $url[1] is the rest of it (queryqtring/articles/xyz/param2/value2/param3/value3)
*/
// If you need you can include your page articles on your index page like this
$page_name = explode("/", $url[0]);
$page_name = end($page_name);
include("/path to your directory/". $page_name .".php");
$query_string = $url[1];
// And one more explode for query string:
$query_params = explode("/", $query_string);
for($i=0; $i<count($query_params); $i++)
{
// odd value is GET name
$key = $query_params[$i];
// even value is GET value
$value = (isset($query_params[$i+1])) ? $query_params[$i+1] : "";
$_GET[$key] = $value;
$i++;
}
echo "<pre>";
print_r($_GET);
echo "</pre>";
/*
// GET Output
Array
(
[articles] => xyz
[param2] => value2
[param3] => value3
)
*/
?>