F
F
Fagi2019-05-27 12:11:29
Apache HTTP Server
Fagi, 2019-05-27 12:11:29

Why doesn't the site work with "www"?

site.ru - everything is fine.
www.site.ru - redirects to the main hosting page.
Decided to redirect. Here is my .htaccess file:

AddDefaultCharset utf-8

DirectoryIndex index.php

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

But doesn't work.
What's wrong?

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question