SMOKEY_TEK Posted July 3, 2012 Posted July 3, 2012 What would it be called to have pages load like the following http://www.yourgamename.com/index.php?do=city ? Here is a little code to what I'm meaning <?php $page = $_REQUEST['do']; file_exists($page.".php") ? include($page.".php") : include("homepage.php");?> Quote
HauntedDawg Posted July 3, 2012 Posted July 3, 2012 .htaccess can do the same thing for you. But why would you want it as "index.php?do=city" when you can have it as "yourgamename.com/city" Quote
grant Posted July 4, 2012 Posted July 4, 2012 RewriteEngine on RewriteCond %{REQUEST_FILENAME} !-d RewriteCond %{REQUEST_FILENAME}\.php -f RewriteRule ^(.*)$ $1.php just add that to .htaccess and rename all you links like http://www.yourgame.com/home...... http://www.yourgame.com/index and so on Quote
sniko Posted July 4, 2012 Posted July 4, 2012 ...But the answer to your question, it is called query string. Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.