WordPress site on mydomain.com

I want to put a blog on blog.mydomain.com

Recorded NA ´ * ´

Now redirects to home. What should I register in htaccess so that mydomain.com/blog becomes blog.mydomain.com?

  • What is a "blog" in the essence of the VP? - SeVlad

1 answer 1

Using .htaccess redirect is done like this:

The first option is the easiest:

 Redirect 301 /blog http://blog.mydomain.com 

The second option:

 RewriteEngine on RewriteCond %{HTTP_HOST} ^/blog(/.*)?$ RewriteRule ^.*$ http://blog.mydomain.com$1 [R=301,L] 

And also note that if you do a redirect, 301 is a permanent redirect, and if you want a temporary one, you need to write 302 instead of 301 .

Details about the types of redirects can be found here .

  • one
    with VP it is impossible to do so! - SeVlad