Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 2 of 2
09-06-2012, 08:33 AM #1
- Join Date
- Jul 2010
- Thanked 18 Times in 18 Posts
Point a domain to a certain folder
I'm not sure if this is apache or not so if not please tell me where I should post this .
Using the windos hosts file I've made it so if I go to www.forum.com it shows my root localhost folder, however I'd like it to show a certain sub folder.
Is there a way with I can make apache look what the domain is, and if its forum.com use the sub folder as the default folder it uses?
I've just found and tried addingCode:
<VirtualHost *> ServerName www.forum.com DocumentRoot "C:/Websites/Dropbox/NAPF" </VirtualHost>
Last edited by tomharto; 09-06-2012 at 08:48 AM.
10-01-2012, 02:42 AM #2
If you wanted you could always change the directory index. So whenever you go to www.forum.com it will go to the files you specify.
If subfolder/this.html doesn't exist it will go to index.html in the root folder instead.Code:DirectoryIndex subfolder/this.html index.html