Results 1 to 4 of 4

Thread: Subdomain to other domain sub

  1. #1
    Member
    Join Date
    Mar 2006
    Posts
    37

    Question Subdomain to other domain sub

    hi!
    I need to set up so that a subdomain looks in a sub folder of ANOTHER DOMAIN on the same machine.

    I would need:
    https://media.domain1.com/image.jpg
    to load
    https://www.domain2.com/media/image.jpg

    Please note the HTTPS

    How can I achieve this?
    thanks!

  2. #2
    Technical Product Specialist cPanelDavidG's Avatar
    Join Date
    Nov 2006
    Location
    Houston, TX
    Posts
    11,307
    cPanel/WHM Access Level

    Root Administrator

    Default

    Quote Originally Posted by 8p-design View Post
    hi!
    I need to set up so that a subdomain looks in a sub folder of ANOTHER DOMAIN on the same machine.

    I would need:
    https://media.domain1.com/image.jpg
    to load
    https://www.domain2.com/media/image.jpg

    Please note the HTTPS

    How can I achieve this?
    thanks!

    The only way to do this would be for both domains to be in the same account. However, as both domains presumably have their own SSL certificates (thus need their own dedicated IPs), you cannot place both domains in the same cPanel/WHM account.

    Perhaps someone knows a way to manually configure Apache to handle this for you.

  3. #3
    Member
    Join Date
    Mar 2006
    Posts
    37

    Default

    thanks for your reply.
    Yes both domains have their own certificate & account.
    They need to stay in different accounts.

    If I was to put HTTPS out of the thread for a moment, would I have another solution while keeping those two domains as separate account?

    thanks again!

  4. #4
    Member
    Join Date
    Dec 2001
    Posts
    746

    Default

    You can use the Redirect link in the Domains menu to accomplish this. Simply choose the domain and directory you wish to redirect and type in the full URL you wish to redirect to in the redirects to field.

    If you need to get fancy, you may wish to take a look at this primer on using .htaccess redirects:

    http://www.webweaver.nu/html-tips/web-redirection.shtml

    As noted by Dave above, you're going to have issues with doing this over SSL, especially since the browser will throw a warning that the domain they are traveling to doesn't match what they typed in.
    Last edited by daveformerlyof; 10-22-2008 at 03:20 PM.

Similar Threads

  1. Subdomain directory accessible from domain.com/subdomain too?
    By Brook in forum cPanel & WHM Discussions
    Replies: 2
    Last Post: 01-14-2008, 12:12 PM
  2. Replies: 2
    Last Post: 07-24-2007, 08:39 AM
  3. instead of domain subdomain
    By jaike in forum cPanel & WHM Discussions
    Replies: 2
    Last Post: 08-02-2006, 04:14 PM
  4. .htaccess to redirect domain.tld/subdomain to subdomain.domain.tld
    By andreseso in forum cPanel & WHM Discussions
    Replies: 0
    Last Post: 01-25-2006, 08:56 AM
  5. subdomain on parked domain leads to main domain?...
    By Devil Inside in forum cPanel & WHM Discussions
    Replies: 2
    Last Post: 07-17-2004, 10:47 AM