regex - htaccess mod_rewrite regular expressions -
i have old website indexed on google , need make 301's let ex. google know page moved.
i moved site wordpress "builded os", single urls.
it goes first page, when need 301 redirect sub links fails.
code:
redirect 301 /what-we-do/ mypage.nu/services redirect 301 /what-we-do/about-us mypage.nu/about
second line fucks , makes "servicesabout" - cant found.
how can make hyphen (-) old url , sub url, direct "single urls" - mean ex. mypage.nu/what-we-do/about-us/members ex mypage.nu/members
please me, i'd tried several regulair expressions ex
redirect 301 /what-we-do/about([^/_]+?)-?us mypage.nu/about
nothing works, can fine rewritematch - mod_rewrite activated on server.
can me?
use redirectmatch
regex support match exact urls:
redirectmatch 301 ^/what-we-do/?$ mypage.nu/services redirectmatch 301 ^/what-we-do/about-us/?$ mypage.nu/about
better test in new browser avoid old cache.
Comments
Post a Comment