L457
L457

Reputation: 1032

Apache (.htaccess and mod_rewrite) url rewrite/redirection not working :404 page not found error

I just installed the mod_rewrite module on my server and am trying to test it out by directing all urls to a webpage good.html

this is my .htaccess file:

RewriteEngine on 
RewriteRule .* good.html

however I keep getting a 404 page not found message? I've checked my httpd.conf file and ran phpinfo() and the module seems to have loaded fine. Any ideas?

Also I am working on apache 2.0.58

Upvotes: 2

Views: 680

Answers (1)

Eder Luis Jorge
Eder Luis Jorge

Reputation: 72

I've got the same problem. Everything looks fine, but I had to change two configurations on httpd.conf (or any other site config loaded).

Change to:

Options FollowSymLinks
AllowOverride All

These options are inside Directory tag. If you do not set AllowOverride All, .htaccess does not take effect.

Eder

Upvotes: 2

Related Questions