I'm using a .htaccess
code that change the url (add 'www.' in non-www urls) but my problem is when entering /subfolder in url , .htaccess
redirect doesn't work right.
Example
I enter this url: mydomain.com/demo/ it redirects to: www.mydomain.com (without /demo
)
any idea?
Here is my .htaccess
code:
RewriteEngine on
RewriteCond %{HTTP_HOST} !^www\. [NC]
RewriteRule ^(.*)$ http://www.%{HTTP_HOST}/$1 [R=301,L]
Maybe this?