Answer the question
In order to leave comments, you need to log in
How to redirect user to site address without WWW?
My website is powered by Joomla CMS . At the moment, the problem is that the site is available at two types of addresses: at such an address www.iz-bumagi.com and at such iz-bumagi.com .
How can the site work in such a way that when a user enters a site with WWW in the address , he will be redirected to the site address without WWW .
Like it happens on this site. I open www.toster.ru and get to toster.ru
Answer the question
In order to leave comments, you need to log in
RewriteEngine On
RewriteBase /
RewriteCond %{HTTP_HOST} ^www\.(.*)$ [NC]
RewriteRule ^(.*)$ http://%1/$1 [R=301,L]
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question