apache - Directory Redirect to sub-folder with same name -


i trying redirect directory (.htaccess) subdirectory same name. getting redirection loop error.

redirectmatch 301 /abc  http://www.example.com/lite/abc/ 

you must delimit pattern otherwise match abc everytime.

with redirectmatch

redirectmatch 301 ^/abc.*$ http://www.example.com/lite/abc/ 

or mod_rewrite

rewriteengine on rewriterule ^abc.*$ /lite/abc/ [r=301,l] 

note: you'll need clear browser's cache before trying code. actually, old rule in cache.


Comments

Popular posts from this blog

Regex find and replace between <div class="customclass"> and </div> tag -

jpa - Passing entitymanager from reflection method -