- Code: Select all
http://www.mydomain.com/main.php?id=home
Note: id=pagename will change depending on what page you are loading.
- Code: Select all
http://www.mydomain.com/home
Help would be appreciated.
Thanks,
Wade
http://www.mydomain.com/main.php?id=home
http://www.mydomain.com/home
Options +FollowSymLinks
RewriteEngine On
# If it's not a request to an existing file.
RewriteCond %{SCRIPT_FILENAME} !-f
# And if it's not a request to an existing directory.
RewriteCond %{SCRIPT_FILENAME} !-d
# /something to /main.php?id=something
RewriteRule ^([^/]+)/?$ /main.php?id=$1 [QSA,L]
Return to Friendly URLs with Mod_Rewrite
Users browsing this forum: No registered users and 3 guests