Page 1 of 1
custom 404 redirection
Posted: Mon Jan 29, 2007 9:21 pm
by train
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
Posted: Mon Jan 29, 2007 10:10 pm
by feyd
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.
Posted: Tue Jan 30, 2007 9:31 pm
by train
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.
Right, but I do not have access to the web sever.
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?
Posted: Tue Jan 30, 2007 10:15 pm
by feyd
If your web server is Apache, you can use .htaccess files quite often. Many hosts have mod_rewrite enabled for their users too.
Posted: Wed Jan 31, 2007 11:08 am
by train
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.
I am not being clear, I guess...
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!!!
Posted: Wed Jan 31, 2007 11:10 am
by feyd
Not possible.