regex - How to redirect my domains without a listing rules or a mapping file -
regex - How to redirect my domains without a listing rules or a mapping file -
i have document directory contains 2 subdirs named the same string found on each of folder named domains / subdomains pointing root this:
root /abc /www.abc.com /myabc.whatever.com /wholike.allabcismyfriend.com /xyz /www.xyz.com /idontlike.anyxyz.com /stupidxyz.ihatethisfellow.com please advise me how redirect request correspond folder using .htaccess preferably in 1 or 2 lines of regex code. (not list them 1 1 in rewriterule nor using mapping file).
edit have got using 1 line code work if set in 1 subdir e.g. 'abc':
rewriterule (.*) /abc/%{http_host}/$1 [l] regex .htaccess url-rewriting url-redirection
Comments
Post a Comment