Forum Moderators: phranque

Message Too Old, No Replies

404 Error with Redirect

         

Jeremy_H

2:17 am on Apr 17, 2006 (gmt 0)

10+ Year Member



Hello,

I'm trying to create a 404 error page for my website, so I created an error page and have added the following line of code to my .htaccess file:

ErrorDocument 404 /error/

If you type in a page that doesn't exist, such as /dfilged.df the error page loads, which is great, but I would like the displayed url to be that of /error/ instead of /dfilged.df.

Is this possible?

Thanks

jdMorgan

12:54 pm on Apr 17, 2006 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



ErrorDocument should point to a *page* on your site. In order for your coed to work, you'll need to define the error page as the index file (e.g. index.html) in the /error/ subdirectory.

If you want the error page URL to appear, you'll have to redirect that error, but that could result in massive duplicate-content problems in search engines. Not recommended.

Jim