Forum Moderators: buckworks & webwork

Message Too Old, No Replies

Domains to different directories

         

charpress

10:53 pm on Sep 20, 2003 (gmt 0)

10+ Year Member



Let's say I have a site called mydomain.com with the main page located at mydomain.com/index.php. I have another domain called blog.com that I would like to go to mydomain.com/blog/index.html. What would be the best way to handle this? It is an Apache server that allows domain parking and sub-domains.

I want anyone entering www.mydomain.com to come up with index.php (the main page) and anyone entering www.blog.com to come up with blog.html from the mydomain.com/blog directory.

Can I do a redirect that would catch the www.blog.com entries only and send it to the blog directory?

jatar_k

11:01 pm on Sep 20, 2003 (gmt 0)

WebmasterWorld Administrator 10+ Year Member



I am not 100% sure of the actual conf but I know that you can direct any domain anywhere. The root of the www.blog.com domain just needs to be set to the path you want.

Want some overwhelming info? I kow the proper conf is somewhere in here
[httpd.apache.org...]

I just can't remember exactly how to set it up (not being a sysadmin after all).

charpress

11:07 pm on Sep 20, 2003 (gmt 0)

10+ Year Member



Mmm... that sounds promising. Maybe I should make the folks I pay for hosting come up with the right config do do this. :)

BjarneDM

12:33 pm on Sep 21, 2003 (gmt 0)

10+ Year Member



use the documentroot directive in the virtual host container.
you'll need virtual hosts in your httpd.conf as you have two domains running around on the same server

charpress

4:36 pm on Sep 22, 2003 (gmt 0)

10+ Year Member



I just got a message from my hosting service. They have implemented what I want for me. I assume they used <virtual host> directives. I also assume they would rather I not get in there and start creating my own configuration. Anyway, I'm glad there was an easy resolution. Thanks for the help.