I've got a folder under the root dir of the web site that is specified as a vhost for a subdomain. So this subdir can be accessed at http://subdir.maindir.com but also at http://www.maindir.com/subdir
Now If I access via http://www.maindir.com/subdir Apache gives a forbidden error and I accept that because the right way is to access via http://subdir.maindir.com
How can I setup apache so that if someone access via http://www.maindir.com/subdir gets automatically to http://subdir.maindir.com ?
I want a clean and powerful setup so probably I should use mod_rewrite but I have no idea on how to do this...
Please help
Thanks
Max
The one with Mac OS X Server 10.4 :)
Now If I access via http://www.maindir.com/subdir Apache gives a forbidden error and I accept that because the right way is to access via http://subdir.maindir.com
How can I setup apache so that if someone access via http://www.maindir.com/subdir gets automatically to http://subdir.maindir.com ?
I want a clean and powerful setup so probably I should use mod_rewrite but I have no idea on how to do this...
Please help
Thanks
Max
The one with Mac OS X Server 10.4 :)