Forum Moderators: phranque

Message Too Old, No Replies

Redirect on Referrer

         

tzflorida

3:32 am on Feb 28, 2009 (gmt 0)

10+ Year Member



I have a directory called /news

I have it setup so that the subdomain news.mydomain.com points to /news

What I would like to achieve with htaccess is to allow only access to the directory if somebody types in the subdomain and prevent any access through: mydomain.com/news

Is this possible through htaccess?

I have not yet found a solution.

Any help appreciated :-)

g1smd

7:59 pm on Feb 28, 2009 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



You'll need a conditional 301 redirect, one that redirects the 'wrong' URL to the right URL.