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

php - Submit Form Data without Reloading page -

linux - Rails running on virtual machine in Windows -