M
M
Matsun2015-04-01 13:29:14
CMS
Matsun, 2015-04-01 13:29:14

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

2 answer(s)
V
Vlad Zhivotnev, 2015-04-01
@Matsu

RewriteEngine On
RewriteBase /
RewriteCond %{HTTP_HOST} ^www\.(.*)$ [NC]
RewriteRule ^(.*)$ http://%1/$1 [R=301,L]

In the root of the site in .htaccess drop.

L
lnked, 2015-04-01
@lnked

cry

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question