.htaccess - htaccess from www to non-www -
i'm having problem.
i have python(django) website, , want delete "www" url, have htaccess:
rewriteengine on rewritebase / rewritecond %{http_host} ^www.mydomain.com/$ [nc] rewriterule ^(/)?(.*) http://mydomain.com/$1 [r=301,l] it works, problem if enter url "www.domain.com/admin" or "www.domain.com/something" redirects "domain.com" instead of "domain.com/admin" or "domain.com/something".
do know wrong htaccess?
thanks lot time , help.
change ^(/)?(.*) ^/?(.*). you're capturing / , appending onto url, instead of part want append $1.
Comments
Post a Comment