I couldn't figure out why my RewriteRule isn't working. I took the following steps to try to fix it:
1. Make sure rewrite_module is enabled ( wamp tray icon -> Apache -> Apache Modules -> rewrite_module ) 2. Restart Apache ( wamp tray icon -> Apache -> Service -> Restart ) 3. Ensure the rewrite_module is checked and that mod_rewrite is one of the loaded module seen in phpinfo() 3. Place my RewriteRules in httpd.conf ( wamp -> Apache -> httpd.conf ) 4. Add the following lines to the end of the httpd.conf file
RewriteEngine On RewriteRule ^/my\.php$ try.php [L]
I tried to drop the '/' before my\.php but it still won't work
The exact error I get is:
400 Bad Request - Your browser sent a request that this server could not understand.
I don't understand what could be wrong with such a simple rewrite rule though.
I didn't bother to use an .htaccess because this is a localhost on my own computer.