mod_rewrite not working
Posted by: ting.at.work@hotmail.com (---.bchsia.telus.net)
Date: June 12, 2010 04:39AM

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.

Options: ReplyQuote
Re: mod_rewrite not working
Posted by: tomkraw1 (---.icpnet.pl)
Date: June 12, 2010 10:26AM

I have TYPO3 cms on my wamp. I use .htaccess in www folder and it works without any changes to httpd.conf. Try with .htaccess.

regards
tk1
[dev.freshsite.pl]

Options: ReplyQuote


Sorry, only registered users may post in this forum.