CodingForums.com

CodingForums.com (http://www.codingforums.com/index.php)
-   Apache configuration (http://www.codingforums.com/forumdisplay.php?f=69)
-   -   Point a domain to a certain folder (http://www.codingforums.com/showthread.php?t=272359)

tomharto 09-06-2012 08:33 AM

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 :p.

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?

EDIT:

I've just found and tried adding
Code:

<VirtualHost *>
ServerName www.forum.com
DocumentRoot "C:/Websites/Dropbox/NAPF"
</VirtualHost>

And that seems to work :).

stevenmw 10-01-2012 02:42 AM

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.

Code:

DirectoryIndex subfolder/this.html index.html
If subfolder/this.html doesn't exist it will go to index.html in the root folder instead.


All times are GMT +1. The time now is 05:51 AM.

Powered by vBulletin®
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.