Forum Moderators: phranque
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f [NC]
RewriteCond %{REQUEST_FILENAME} !-d [NC]
RewriteRule ^(.*).html index.php?page=$1 [QSA]
RewriteRule ^sitemap.xml google-sitemap.php
If I go to Home.html for example it should load index.php?page=Home but instead it says page not found, and same if I go to sitemap.xml
I have done a phpinfo() on the server and in the apache2handler section under Loaded Modules it says mod_rewrite so I dont see why else this shouldnt work. Any ideas?
but when uploaded onto a Linux box with Apache it does not work.It looks like AllowOvrride FileInfo was not set, so your directives in per-directory configuration files are simply ignored.
Some server configurations require Symlinks specifically enabled:If RewriteRules are used in per-dir context and the option Followsymlinks is not enabled for that directory, you'd receive a 403 forbidden error issued by mod_rewrite.