Redirect to main page instead of error message
I would like to know how to redirect all traffic to the gallery main page when an image is incorrectly specified.
For example: When there is an outside link to any image which has been deleted (or never existed), I want visitors to land at the main page instead of receiving the error message. Basically when any invalid gallery URL is used such as http://www.mydomain/gallery/xyz123
Can any help point to where this code is located? Thanks.
EDIT: I'm looking at how SourceForge Gallery does this and I think it might be an .htaccess file that rewrites all invalid URLs to the index page. This is what I'm trying to accomplish if anyone has an idea...
Re: Redirect to main page instead of error message
Yeah, you just need a .htaccess file with something like this in it:
ErrorDocument 404 /gallery/index.php
Put that in your /gallery/files/ directory I think.
|All times are GMT -5. The time now is 04:37 PM.|
Powered by vBulletin® Version 3.8.1
Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.