Hi,
If I wanted to (via a plugin, or cooperation with an ISP, or some other way) have people redirected to a page of my choosing whenever they received a 404 error, how could this be done?
Even if I do not have access to the files on the server that is handing out the 404's, is there a way to have the browser recognize that it is a 404 and redirect to another page?
I appeciate your input and ALL ideas.
Thanks so much.
Terrance
custom 404 redirection
Moderator: General Moderators
- feyd
- Neighborhood Spidermoddy
- Posts: 31559
- Joined: Mon Mar 29, 2004 3:24 pm
- Location: Bothell, Washington, USA
There are several Apache directives (and IIS ones too) that can control the behavior of the server when a 404 is encountered. If you do not have access to the main configuration, you can possibly use mod_rewrite or equivalent to detect the nonexistent file or directory.
If you want to know more about the mod_rewrite directives needed, search through our Installation and Configuration board. I know at least one post that had directives specifically for this.
If you want to know more about the mod_rewrite directives needed, search through our Installation and Configuration board. I know at least one post that had directives specifically for this.
Right, but I do not have access to the web sever.feyd wrote:There are several Apache directives (and IIS ones too) that can control the behavior of the server when a 404 is encountered. If you do not have access to the main configuration, you can possibly use mod_rewrite or equivalent to detect the nonexistent file or directory.
If you want to know more about the mod_rewrite directives needed, search through our Installation and Configuration board. I know at least one post that had directives specifically for this.
I only have available to me what is available to the client.
It is a puzzle. I was thinking java applet network sniffer to catch the HTTP return code and then do whatever?
I am not being clear, I guess...feyd wrote:If your web server is Apache, you can use .htaccess files quite often. Many hosts have mod_rewrite enabled for their users too.
We have access to client browsers only. We are not in control of any web servers whatsoever. This has to be entirely client-side.
I was thinking that somehow we could grab the HTTP return codes and do something if we see 404?
But how?
Thanks a lot!!!