.htaccess - Redirect sub directory to diff domain using same subdirectory -


there many posts on issue, couldn't find answer. when tried change htaccess caused problems.

www.xyz.com points www.xyz.com/mysite works great , user sees www.xyz.com unfortunately if types www.xyz.com/mysite same site, see www.xyz.com/mysite

ideally when type www.xyz.com/mysite show www.xyz.com.

thank help

you can use redirect rule inside /mysite/.htaccess:

rewriteengine on  rewritecond %{the_request} /mysite [nc] rewriterule ^ / [l,r=302,ne] 

Comments

Popular posts from this blog

dns - How To Use Custom Nameserver On Free Cloudflare? -

python - Pygame screen.blit not working -

c# - Web API response xml language -