.htaccess redirect - should this work? -


i using rule:

redirectmatch 301 /resources/(.*) /community//$1 

to redirect these sorts of url's:

http://www.domain.com/resources/view/123 

to

http://www.domain.com/community/view/123 

and

http://www.domain.com/resources/all/ 

to

http://www.domain.com/community/all/ 

given rule above, should need do?

yes, work fine (but still remove double slash // in target url part -- single slash enough).

in case -- can make bit simpler (no need relatively expensive regex @ such simple redirect). simple redirect instead of redirectmatch same job:

redirect 301 /resources/ /community/ 

Comments

Popular posts from this blog

javascript - Iterate over array and calculate average values of array-parts -

iphone - Using nested NSDictionary with Picker -

objective c - Newbie question -multiple parameters -