Redirecting Subdirectory to Subdomain with htaccess

后端 未结 5 1577
再見小時候
再見小時候 2021-01-06 09:38

I\'m relatively new to using .htaccess, and have never done any coding besides what I\'ve read online. I\'m using Bluehost, and I\'d like to redirect my blog subdirectory t

5条回答
  •  情书的邮戳
    2021-01-06 09:47

    Have you tried this one?

    RewriteEngine on
    RewriteBase /
    RewriteRule ^/blog/(.*)$ http://blog.subdomain.com/$1 [R=301,L]
    

提交回复
热议问题