I was reading few articles on mod_rewrite, and it gave me a huge headache, so I'm posting my question hoping someone can answer so I can learn from the example i have a site with multiple pages all referred to by index.php?page=name i would like to be able to goto domain.com/home domain.com/news and have it redirect to: domain.com/index.php?page=home domain.com/index.php?page=news any help is greatly appreciated
Try this: Create .htaccess file on your server (under main folder or document root) with the following entries: Options +FollowSymLinks RewriteEngine On RewriteRule ^([^/]+)?$ index.php?page=$1 This is telling the apache that anything followed by the domain name, whihc is not slash (/), should go to index.php with page name parameter...!!