I've been struggling with this for ages. Basically on my site I have a wildcard SSL with following subdomain:
forum.domain.com
As usual domain.com goes to a folder such as public_html. I've used the Apache config to direct forum.domain.com to public_html/forum.
It works fine but I want to put an htaccess in public_html/forum that will cause
www.domain.com/forum to be rewritten as forum.domain.com
I've found various means of doing this online but they always have something like this:
Code:
RewriteCond %{HTTP_HOST} !^forum\.domain\.com [NC]
RewriteCond %{HTTP_HOST} !^$
RewriteRule ^/(.*) http://forum.domain.com/$1 [L,R]
I can't use this though as I need it to work for both http and https. Any ideas?