Go Back   CodingForums.com > :: Server side development > Apache configuration

Before you post, read our: Rules & Posting Guidelines

Reply
 
Thread Tools Rate Thread
Enjoy an ad free experience by logging in. Not a member yet? Register.
Old 09-06-2012, 08:33 AM   PM User | #1
tomharto
Regular Coder

 
Join Date: Jul 2010
Location: Sheffield
Posts: 794
Thanks: 91
Thanked 18 Times in 18 Posts
tomharto is on a distinguished road
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?

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 .

Last edited by tomharto; 09-06-2012 at 08:48 AM..
tomharto is offline   Reply With Quote
Old 10-01-2012, 02:42 AM   PM User | #2
stevenmw
Regular Coder

 
stevenmw's Avatar
 
Join Date: Jun 2007
Location: OK
Posts: 446
Thanks: 26
Thanked 30 Times in 30 Posts
stevenmw is an unknown quantity at this point
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.
stevenmw is offline   Reply With Quote
Reply

Bookmarks

Jump To Top of Thread


Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 10:39 PM.


Advertisement
Log in to turn off these ads.