URL rewrite to remove parameters
- by samoyed
Hello to all,
I'm working on a site where all the pages are actually index.php + a 'name' parameter that is analyzed
and loads the appropriate template and content.
the homepage url is:
http://www.some_site.com/?page=homepage
1. i was asked to "change" the homepage url to:
http://www.some_site.com
can i use url rewite and htaccess for that and if so, what should i write there?
working on my local machine, i tried this code (mode rewrite is enabled):
<IfModule mod_rewrite.c>
Options +FollowSymLinks
RewriteEngine On
RewriteRule /index.php /index.php?page=homepage
</IfModule>
i would still need the 'name' parameter to be available to the php code of course, so i can load the
template and css files.
2. it would be nice for other pages (not homepage) to be converted from (example)
http://www.some_site.com/?page=products
to:
http://www.some_site.com/products
this is less crucial.
thanx in advance and have a nice day :-)