I thought this was pretty simple, but it doesn’t seem to be working for me. I put in my httpd.conf:
RewriteCond %{HTTP_HOST} ^blog\.domain\.com [NC]
RewriteRule ^(.+)$ http://www.domain.com/blog/index.php [L,R=301]
I looked at two other questions here, one recommended ProxyPass, which didn’t seem to work either.
My other thought was a VirtualHost for blog.domain.com. What’s the best way to do this?
In my .htaccess I use it like this:
Note that I use
(^|.)for people who would writewww.blog.domain.com!Dont forget to handle https also.