0

There are many posts on this issue, but I couldn't find the answer. When I tried to change htaccess it caused problems.

www.xyz.com points to www.xyz.com/mysite This works great and user only sees www.xyz.com Unfortunately if someone types www.xyz.com/mysite they also get the same site, but they see www.xyz.com/mysite

Ideally when they type www.xyz.com/mysite it will show www.xyz.com.

Thank You for your help

user3757731
  • 277
  • 2
  • 11
  • possible duplicate of [Mod Rewrite redirect URL with query string to pretty url](http://stackoverflow.com/questions/11629896/mod-rewrite-redirect-url-with-query-string-to-pretty-url) – Sumurai8 Aug 16 '15 at 18:00

2 Answers2

0

You can use this redirect rule inside /mysite/.htaccess:

RewriteEngine On

RewriteCond %{THE_REQUEST} /mysite [NC]
RewriteRule ^ / [L,R=302,NE]
anubhava
  • 761,203
  • 64
  • 569
  • 643
0

Solved it. This was not a htaccess issue. It was a WordPress issue. I did not change the WordPress Address (URL) and Site Address (URL) in the General Settings to the new url.

user3757731
  • 277
  • 2
  • 11