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 / cat1 / page_title under / new-cat-1 / page_title , / new-global-cat / page-title I'm .

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 cat1 and cat2 that I need to redirect

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 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

Popular posts from this blog

php - PDO bindParam() fatal error -

logging - How can I log both the Request.InputStream and Response.OutputStream traffic in my ASP.NET MVC3 Application for specific Actions? -

java - Why my included JSP file won't get processed correctly? -