Inersha
09-13-2011, 10:37 PM
Hi everyone,
How would I go about redirecting 404 errors within specific folders using htaccess?
For example, let's say I have the folder structure like this:
site.com/goat/ <= this page exists
site.com/goat/page/ <= this page exists
site.com/goat/404/ <= this page does NOT exists
If someone were to navigate to site.com/goat/404/ (or any page for that matter that doesn't exist within the /goat/ main directory), how would I go about redirecting them to the main /goat/ directory?
So if you visit an actual page that exists within /goat/ you see the page as normal. However, if you visit a url within /goat/ that returns a 404, you get redirected back to the main /goat/ root.
Any ideas?
How would I go about redirecting 404 errors within specific folders using htaccess?
For example, let's say I have the folder structure like this:
site.com/goat/ <= this page exists
site.com/goat/page/ <= this page exists
site.com/goat/404/ <= this page does NOT exists
If someone were to navigate to site.com/goat/404/ (or any page for that matter that doesn't exist within the /goat/ main directory), how would I go about redirecting them to the main /goat/ directory?
So if you visit an actual page that exists within /goat/ you see the page as normal. However, if you visit a url within /goat/ that returns a 404, you get redirected back to the main /goat/ root.
Any ideas?