Restrict access to web directory but allow sub-domain

stounates

New Member
I am trying to deny access to a sub-domain directory from people accessing directly rather get them to browse to the sub-domain directly. For e.g I want people to be able to go to http://test.example.com and not http://example.com/test. If they do show a 403 Forbidden error. Is this possible through htaccess ? Googled it but cant see anyone doing this. The main purpose being to disallow them from accessing the contents directly. Tried the following to no success.\[code\]<Directory /test> Order Deny,Allow Deny from all Allow from .example.com</Directory>\[/code\]
 
Back
Top