SitePoint Sponsor

User Tag List

Results 1 to 4 of 4
  1. #1
    SitePoint Addict
    Join Date
    Aug 2006
    Posts
    288
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Pointing a domain to a directory of another domain

    Hello,

    Lets say I have a domain "somedomain.com" with a directory like "somedomain.com/mobile". Now I also have somedomain.mobi , how can I make the .mobi domain point to somedomain.com/mobile ?

    I don't want just to redirect or mask, I want it to work normally, like a subdomain would.

    Thanks

  2. #2
    SitePoint Enthusiast lkagan's Avatar
    Join Date
    Sep 2007
    Location
    Boca Raton, Florida
    Posts
    90
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Assuming you're using Apache, it's quite simple. Assuming the mobile document root is at /var/www/somedomain.com/mobile

    From within your name-based virtual host config, you would just use this directive for your document root:
    DocumentRoot /var/www/somedomain.com/mobile
    Larry Kagan
    Lead Web Application Developer
    Superiocity, Inc.

  3. #3
    SitePoint Addict
    Join Date
    Aug 2006
    Posts
    288
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Yes I am using apache. I will ask my host to do that.

    Thanks

  4. #4
    Certified Ethical Hacker silver trophybronze trophy dklynn's Avatar
    Join Date
    Feb 2002
    Location
    Auckland
    Posts
    14,692
    Mentioned
    20 Post(s)
    Tagged
    3 Thread(s)
    z123,

    A subdomain is the same as a completely different domain so it would be handled exactly the same way another domain would be handled, i.e., via the DNS and your control panel/httpd.conf.

    Regards,

    DK
    David K. Lynn - Data Koncepts is a long-time WebHostingBuzz (US/UK)
    Client and (unpaid) WHB Ambassador
    mod_rewrite Tutorial Article (setup, config, test & write
    mod_rewrite regex w/sample code) and Code Generator


Bookmarks

Posting Permissions

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