Apache htaccess is doing my nut in
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] |
Can you just use virtual hosts?
AKA domain.com points to public_html, whereas the forum area has its own folder, with its own config for forum.domain.com. Here is a relatively simple tutorial on how to set up virtual hosts: http://www.debian-administration.org/articles/412 |
Quote:
"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." My post is in regards to the fact that it's still possible to use domain.com/forum/ to view the forum, whereas I only want it viewable by the other method forum.domain.com which will require an htaccess rewrite rule which works from the forums directory onward. |
All times are GMT -5. The time now is 12:06 AM. |