Currently I have this on my htaccess
RewriteEngine On
RewriteCond %{HTTP_HOST} ^(www\.)?mydomain\.com$
RewriteCond %{REQUEST_URI} !^/real-estate [NC]
RewriteRule ^(.*)$ /real-estate/$1 [L]
I want to redirect the user
mydomain.com -> mydomain.com/real-estate
www.mydomain.com - > www.mydomain.com/real-estate
www.mydomain.com/abc - > www.mydomain.com/real-estate/abc
and so on...
mydomain.com
is properly redirecting to mydomain.com/real-estate
The problem are the following
www.mydomain.com
is redirecting to www.mydomain/home4/xxxxx/public_html/real-estate
www.mydomain.com/abc
and mydomain.com/abc
is showing the page properly but not changing url in address bar (it should display www.mydomain.com/real-estate/abc
)