Hi All,
I would like to setup my site so that when a page is request that does not
exist, transfer is instead passed to a certain page that I specify. For
instance, if the user requests http://mysite.com/pages/contact and that is
not a valid page or directory, then the request is handed to
http://mysite.com/pages/display.php or something like that.
I am wondering what the best way to do this is - I know that I could use an
..htaccess file to redirect 404 errors, but I would rather not give a 404
error in the first place. Is there a better/other way? I seem to remember
having read about another way... but I can't seem to remember...
This is in a LAMP environment, and does not need to be portable to Windows
or any other webserver.
Any help would be greatly appreciated!
His,
-Josh
I would like to setup my site so that when a page is request that does not
exist, transfer is instead passed to a certain page that I specify. For
instance, if the user requests http://mysite.com/pages/contact and that is
not a valid page or directory, then the request is handed to
http://mysite.com/pages/display.php or something like that.
I am wondering what the best way to do this is - I know that I could use an
..htaccess file to redirect 404 errors, but I would rather not give a 404
error in the first place. Is there a better/other way? I seem to remember
having read about another way... but I can't seem to remember...
This is in a LAMP environment, and does not need to be portable to Windows
or any other webserver.
Any help would be greatly appreciated!
His,
-Josh
Comment