Forum Moderators: phranque
Both these lines are uncommended in httpd.conf
LoadModule rewrite_module
AddModule mod_rewrite.c
I have also done
<Directory />
Options All
AllowOverride All
</Directory>
.htaccess file looks like
ErrorDocument 404 [domain.com...]
but when I type in www.domain.com/sdfgkjdf.html it receives a 404 error and is not redirected.
info.php shows mod_rewrite enabled.
Any ideas would be appreciated, thanks.
Got a simple mod_rewrite I could use to test?
And www.site.com/google.html is not redirecting to www.google.com
Do I have to specify a directory in <Directory />?
ErrorDocument 404 Http://www.example.com
The correct syntax is:
ErrorDocument 404 /
However, I strongly suggest you do not use your home page as an error document if you care about search engine ranking. Doing so runs the risk of your home page URL disappearing, to be replaced in search results by one of the missing page URLs. Do a search for 'duplicate content penalty' -- an unfortunate misnomer -- for descriptions of how a search engine may list 'the wrong' page if you confuse it.
Jim