Redirect all files in a directory
I'm having a problem with 301 redirects.
I have a sub-directory that contains a forum that is no longer used. I want to redirect all hits on that directory back to the main root of the site.
i.e. abc.com/my-directory/ > abc.com
this only seems to work on the directory but not on the files in the directory.
i.e. abc.com/my-directory/my-file.html does not redirect at all. It still goes to the original file
If I use a wildcard redirect then this happens:
abc.com/my-directory/my-file.html > abc.com/my-file.html
Is there a way to redirect all links to that directory regardless of what file is specified?
Any advice appreciated.
Kerry
-
Hello :) You will likely need to implement some custom Mod_Rewrite rules in order to redirect those requests. You may want to post to the support forums of the previous script you were using to see what type of rules others might have utilized. Thank you. 0
Please sign in to leave a comment.
Comments
1 comment