S
S
Sergey Ivonov2017-02-15 12:29:34
htaccess
Sergey Ivonov, 2017-02-15 12:29:34

How to deal with a 301 redirect?

Hello. There is such a task to make a 301 redirect (Domain redirection from www to non-www).
I have wordpress installed in the root file there is .htaccess with the content this

# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>

# END WordPress

But when I drive from www, she throws me away without www. I don't know if this is correct?
Please tell me how to make a .htaccess c file with a redirect to without www and in which folder to drop this file.
Thank you.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
C
Camaro67, 2017-02-15
@bahridinovf

But when I drive from www, she throws me away without www. I don't know if this is correct?

That's right, you should be redirected to one address (with www or without www).
So you will be redirected to an address without www. What is the problem?

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question