+ Post New Thread
Results 1 to 9 of 9
Networks Thread, domain name to point to subfolder on webserver. in Technical; We have a box just for a joomla site, and i wanted to host another one on the same box, ...
  1. #1
    Quackers's Avatar
    Join Date
    Jan 2006
    Location
    Staffordshire
    Posts
    961
    Thank Post
    28
    Thanked 59 Times in 52 Posts
    Rep Power
    33

    domain name to point to subfolder on webserver.

    We have a box just for a joomla site, and i wanted to host another one on the same box, which works fine. The original site is in the www root, so i just created another folder for the additional joomla site called cyc in the www root.

    How do i get the domain to point to the /cyc of the webserver?

  2. IDG Tech News

  3. #2
    Geoff's Avatar
    Join Date
    Jun 2005
    Location
    Fylde, Lancs, UK.
    Posts
    11,056
    Blog Entries
    1
    Thank Post
    104
    Thanked 439 Times in 380 Posts
    Rep Power
    114

    Re: domain name to point to subfolder on webserver.

    Make an index.php with the following in it.

    Code:
    <?php
    header( 'Location: http://www.yoursite.com/cyc/' ) ;
    ?>

  4. #3
    Quackers's Avatar
    Join Date
    Jan 2006
    Location
    Staffordshire
    Posts
    961
    Thank Post
    28
    Thanked 59 Times in 52 Posts
    Rep Power
    33

    Re: domain name to point to subfolder on webserver.

    and save this file where?

  5. #4
    mrforgetful's Avatar
    Join Date
    May 2006
    Posts
    1,626
    Thank Post
    7
    Thanked 15 Times in 15 Posts
    Rep Power
    18

    Re: domain name to point to subfolder on webserver.

    Ahh IIS...

  6. #5
    Iain's Avatar
    Join Date
    Oct 2006
    Location
    Warwickshire
    Posts
    162
    Thank Post
    25
    Thanked 79 Times in 44 Posts
    Rep Power
    25

    Re: domain name to point to subfolder on webserver.

    Are you using Apache? If so, you can just use name based virtual hosts.

    Iain

  7. #6
    Quackers's Avatar
    Join Date
    Jan 2006
    Location
    Staffordshire
    Posts
    961
    Thank Post
    28
    Thanked 59 Times in 52 Posts
    Rep Power
    33

    Re: domain name to point to subfolder on webserver.

    Yeah its apache, do you have any simple instructions as to what i need to do, i'm an IIS person, its only Joomla and Moodle that run apache here, rest is IIS.

  8. #7
    Geoff's Avatar
    Join Date
    Jun 2005
    Location
    Fylde, Lancs, UK.
    Posts
    11,056
    Blog Entries
    1
    Thank Post
    104
    Thanked 439 Times in 380 Posts
    Rep Power
    114

    Re: domain name to point to subfolder on webserver.

    Quote Originally Posted by Quackers
    and save this file where?
    Your document root.

  9. #8

    Join Date
    Oct 2006
    Posts
    2,935
    Thank Post
    171
    Thanked 273 Times in 215 Posts
    Rep Power
    91

    Re: domain name to point to subfolder on webserver.

    Its all in your httpd.conf

    Its very well documented on the apache website

  10. #9
    Iain's Avatar
    Join Date
    Oct 2006
    Location
    Warwickshire
    Posts
    162
    Thank Post
    25
    Thanked 79 Times in 44 Posts
    Rep Power
    25

    Re: domain name to point to subfolder on webserver.

    Sure, to set up name based virtual hosts you'll need to edit your httpd.conf file.

    First make sure it contains the directive
    Code:
    NameVirtualHost *:80
    Then add your existing site as a virtual host with (assuming your document root is /var/www/html)
    Code:
    <VirtualHost *:80>
    ServerName www.firstdomainname.com
    DocumentRoot /var/www/html
    </VirtualHost>
    Then add your new site with
    Code:
    <VirtualHost *:80>
    ServerName www.seconddomainname.com
    DocumentRoot /var/www/html/cyc
    </VirtualHost>
    As has been said, more detailed information can be found on the apache website.

    Hope this is of some help,

    Iain.

SHARE:
+ Post New Thread

Similar Threads

  1. Point to point network speed test tools
    By tarquel in forum Networks
    Replies: 13
    Last Post: 10th May 2010, 12:59 PM
  2. Webserver & PHP site advice
    By FN-GM in forum Web Development
    Replies: 17
    Last Post: 2nd December 2007, 01:58 AM
  3. Point to Point Bandwidth Test
    By ICTNUT in forum How do you do....it?
    Replies: 1
    Last Post: 10th September 2007, 01:14 PM
  4. My WebServer Died :'(
    By fooby in forum Hardware
    Replies: 13
    Last Post: 16th February 2006, 01:30 PM
  5. Which Webserver Installation Kit?
    By in forum Web Development
    Replies: 16
    Last Post: 15th November 2005, 11:36 PM

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •