I suppose you could do it at the web server level with url rewriting, though it seems an unnecessary extra bit of effort and processing just to change one punctuation character to another.
"Please give us a simple answer, so that we don't have to think, because if we think, we might find answers that don't fit the way we want the world to be."
~ Terry Pratchett in Nation
<? if (isset($_GET['act'])) $PAGE = $_GET['act']; # You can change the value between the brackets to change the index.php?xxx #
else $PAGE = 'home'; # When no page is being asked for, it will default to home. See below!
switch ($PAGE) {
//1- index
case 'home': # value to call , index.php?xxx=home
include ('home.php'); # path to file
break;
//2-about
case 'about': # value to call , index.php?xxx=about
include ('/about/about.htm'); # path to file
break;
default:
echo "<p align=center>Error 404! the page you request doesn't exist or as been temporarily inaccessible </p>"; # Page request not found
break;
} ?>
You'll have to grab the entire query string from the URL and parse it yourself, probably from the $_SERVER['QUERY_STRING'] super-global. Life will be a lot easier for you though if you follow the same protocol that 99.999% of the web follows and use the HHTP standard "&" character as your key=value pair separator, and just grab them from the $_GET array.
"Please give us a simple answer, so that we don't have to think, because if we think, we might find answers that don't fit the way we want the world to be."
~ Terry Pratchett in Nation
Bookmarks