php - .htaccess 301 Redirect Folder and Subfolders -
I want to redirect an original folder to a different location than the subfolders. When I use code instead of 301 / cat1 / new-cat-1 redirect 301 / cat1 / page_title / new-global-cat / page-title Redirect 301 / cat2 / new-cat-2 redirects 301 / cat2 / Page_title / new-global-cat / page-title It seems that the redirect for the parent folder is taking precedence over the redirect for the subfolder. I have a long list of redirects under How can I do a redirect? Am who works for parents and sub-folders without interfering with each other? Additional information: This is a Wordpress website. To fix this problem / cat1 / page_title under
/ new-cat-1 / page_title ,
/ new-global-cat / page-title I'm .
cat1 and
cat2 that I need to redirect
RedirectMatch here for your regex capabilities :
RedirectMatch 301 ^ / cat1 /? $ / New-cat-1 redirect match 301 ^ / cat1 / page_title /? $ / New-global-cat / page-title RedirectMatch 301 ^ / cat2 /? $ / New-cat-2 redirectmate301 ^ / cat2 / page_title /? $ / New-global-cat / page-title
Comments
Post a Comment