RewriteOptions inherit
RewriteEngine on
RewriteCond %{HTTP_HOST} ^.*$
RewriteRule ^/?$ "http\:\/\/www\.ourfamilyforum\.org\/FamilyForum\/index\.php" [R=301,L]
RewriteCond %{HTTP_HOST} ^ourfamilyforum\.org$ [OR]
RewriteCond %{HTTP_HOST} ^www\.ourfamilyforum\.org$
RewriteRule ^/?$ "http\:\/\/www\.ourfamilyforum\.org\/FamilyForum\/index\.php" [R=301,L]
ErrorDocument 404 http://www.ourfamilyforum.org/FamilyForum/index.php?page=208
Good job and GREAT error page!!! I remember those commercials! LOL
What does this part mean?
[R=301,L]
ErrorDocument 404 http://www.ourfamilyforum.org/FamilyForum/index.php?page=208
Hi Ken,
No, that's not correct. You should have this:
ErrorDocument 404 /FamilyForum/index.php?page=208
(You're mixing up a 301 redirect with the ErrorDocument directive.)
Also you must not include the full URL in an ErrorDocument directive or you won't get the all-important 404 status code: it will do a 302 redirect instead (which is what it does right now), which will screw your site up.
Modify as I've suggested and then check the HTTP headers to ensure it's sending a 404 code as well as serving up the 404 page:
Check the headers with one of these tools...
Live http headers (a Firefox browser addon_: https://addons.mozilla.org/en-US/firefox/addon/live-http-headers/
Rex Swain's http viewer: http://www.rexswain.com/httpview.html
Web sniffer: http://web-sniffer.net/
Hi Ken,
No, that's not correct. You should have this:
ErrorDocument 404 /FamilyForum/index.php?page=208
@Skhilled
Steve, this information may be needed for you to correctly set your 404 redirect.
I posted on the Google 'Webmaster' support forums and was told that my code was wrong and should be as follows:QuoteHi Ken,
No, that's not correct. You should have this:
ErrorDocument 404 /FamilyForum/index.php?page=208
(You're mixing up a 301 redirect with the ErrorDocument directive.)
Also you must not include the full URL in an ErrorDocument directive or you won't get the all-important 404 status code: it will do a 302 redirect instead (which is what it does right now), which will screw your site up.
Modify as I've suggested and then check the HTTP headers to ensure it's sending a 404 code as well as serving up the 404 page:
Check the headers with one of these tools...
Live http headers (a Firefox browser addon_: https://addons.mozilla.org/en-US/firefox/addon/live-http-headers/
Rex Swain's http viewer: http://www.rexswain.com/httpview.html
Web sniffer: http://web-sniffer.net/
After making the change to my .htaccess file the error page call works as it should. (the support helper had me run a check to see how Google was reading the page call)
You can find the support topic at this link...
https://productforums.google.com/forum/#!msg/webmasters/8KmJGnTDl4s/bwj4E9U4d-gJ