.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

linux - Using a Cron Job to check if my mod_wsgi / apache server is running and restart -

actionscript 3 - TweenLite does not work with object -

jQuery Ajax Render Fragments OR Whole Page -