So, I am new to apache scripting and was trying to do some simple URL rewriting. Things work on a local server but not deployed on a web server. I'm trying to do a very basic thing: redirect /foo to /index.php?page=foo (with page foo.php being in the same directory as index.php) And when I try to do the following:
RewriteEngine on
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME}.php -f
RewriteRule ^(.+)$ index.php?page=$1 [L,QSA]
My local server does the right thing but the remote one just displays foo.php Thanks for any help! Cheers