E-Dub
asked on
RegEx 301 Redirect
I'm trying to set up a 301 redirect in my htaccess page where a certain subfolder and ANYTHING after it will redirect to a specific page.
For example:
I want http://website.com/service-guide/ or http://website.com/service-guide/folder1/ or http://website.com/service-guide/folder1/folder2 to redirect to http://website.com/static-page.
I have been trying to make this work with RegEx but can't figure it out. I'm totally new to RegEx so any help would be greatly appreciated.
For example:
I want http://website.com/service-guide/ or http://website.com/service-guide/folder1/ or http://website.com/service-guide/folder1/folder2 to redirect to http://website.com/static-page.
I have been trying to make this work with RegEx but can't figure it out. I'm totally new to RegEx so any help would be greatly appreciated.
ASKER
That works if it's only "/service-guide" but when there's more than that "/service-guide/folder1/fo lder2, etc" it throws up a 404 error. Do you have any other suggestions to make it work?
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Thank so much!!
Open in new window
Doing it this way should include any subfolder of service-guide.