Page 1 of 1
Error docs I.E. 404, 403.etc
Posted: Wed Sep 25, 2013 2:52 pm
by chris98
I'm not really sure which forum this belongs in, but I will post it here.
Some websites can hide the URL of their error pages.How do they do this?
I.E.
http://stronghold2.heavengames.com/hgfh ... fhgfhgfhgf
How can you stop it from redirecting to the error page, and instead just show the content of the error page?
Thanks in advance.
Re: Error docs I.E. 404, 403.etc
Posted: Wed Sep 25, 2013 3:21 pm
by requinix
Don't actually redirect and just show the error page. How, depends on why the error page is happening, like your PHP code could do it, or your .htaccess could do it, or Apache could do it.
Re: Error docs I.E. 404, 403.etc
Posted: Thu Sep 26, 2013 1:57 am
by chris98
This is what I currently have.How could I change it so that it wouldn't redirect?
ErrorDocument 404
http://www.mysite.com/404.php
Re: Error docs I.E. 404, 403.etc
Posted: Thu Sep 26, 2013 2:42 am
by requinix
Don't put the domain name in there.
ErrorDocument
Note that when you specify an ErrorDocument that points to a remote URL (ie. anything with a method such as http in front of it), Apache will send a redirect to the client to tell it where to find the document, even if the document ends up being on the same server.
Re: Error docs I.E. 404, 403.etc
Posted: Thu Sep 26, 2013 11:11 am
by chris98
Thanks, that has done it now.