.htaccess - Apache 301 Redirect from www.subdomain to domain folder -
i want redirect www.blog.domain.com
to
www.domain.com/blog/
rewritecond %{http_host} ^www\.blog\.domain\.com rewriterule ^(.*)$ http://www.domain.com/blog/$1 [r=301] what missing here?
those rules fine me, assuming:
- you've put them in htaccess file in document root of
www.blog.domain.comdomain - you don't have other rules before redirect rules may handling request before reaches redirect
- the rewrite module loaded apache instance
- the document root configured @ least
allowoverride fileinfo(or all)
Comments
Post a Comment