3
votes

So I'm trying to get mod_rewrite to work, using Apache2.2 on windows 7 I'm running it as a local server. All sites are accessed at http://localhost/ It's not working?

I created a simple .htaccess file and it won't work.

in the httpd.conf I changed it to

Options All AllowOverride ALL

Whats the problem?

2

2 Answers

3
votes

Try writing garbage in your .htaccess file. This should cause a 5xx error message. If it does not then your AllowOverride All is at the wrong place in your config.

I would also suggest adding a (name based) virtualhost to keep your configuration at one place instead of modifying the defaults.

0
votes

Just want to add to the above which is correct, I was also pulling my hair on a non-working .htaccess. After hours of testing and troubleshooting it turned out that, even though my Sublime Text 2 was set to UTF-8, somehow it was still carrying over hidden special characters that were the root cause of my problem. After copying & pasting .htaccess' contents into vim editor, removing those weird characters, then resaving things started working as should.