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.
Error docs I.E. 404, 403.etc
Moderator: General Moderators
Re: Error docs I.E. 404, 403.etc
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.
- chris98
- Forum Contributor
- Posts: 103
- Joined: Tue Jun 11, 2013 10:47 am
- Location: England, United Kingdom
Re: Error docs I.E. 404, 403.etc
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
ErrorDocument 404 http://www.mysite.com/404.php
Last edited by chris98 on Sat Mar 08, 2014 10:09 am, edited 1 time in total.
Re: Error docs I.E. 404, 403.etc
Don't put the domain name in there.
ErrorDocument
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.
- chris98
- Forum Contributor
- Posts: 103
- Joined: Tue Jun 11, 2013 10:47 am
- Location: England, United Kingdom
Re: Error docs I.E. 404, 403.etc
Thanks, that has done it now.