The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Masking URL

Discussion in 'General Discussion' started by princed, May 15, 2004.

Thread Status:
Not open for further replies.
  1. princed

    princed Registered

    Joined:
    May 15, 2004
    Messages:
    2
    Likes Received:
    0
    Trophy Points:
    1
  2. linux-image

    linux-image Well-Known Member

    Joined:
    Jun 8, 2004
    Messages:
    1,192
    Likes Received:
    1
    Trophy Points:
    38
    Location:
    India
    cPanel Access Level:
    Root Administrator
    Edit the httpd.conf:
    For the entry for the add-on domain. There will be a ServerName field. Make it as:
    ===============================
    ServerName www.addon.com
    ===============================
    Get to me if that dosen't fix.
     
  3. grefix

    grefix Registered

    Joined:
    Nov 29, 2003
    Messages:
    2
    Likes Received:
    0
    Trophy Points:
    1
    almost the same problemso I post it in this thread

    got a domain: domain.com
    and a add-on domain: addon.com
    that's pointed to a subdomain: sub.domain.com

    I do'nt want my visitors to be able to access the site via the subdomain, but force them to use the addon domain.

    Can this be done too? (note: I don't have access to the httpd.conf)

    thanks in advance
     
    #3 grefix, Jul 1, 2004
    Last edited: Jul 1, 2004
  4. princed

    princed Registered

    Joined:
    May 15, 2004
    Messages:
    2
    Likes Received:
    0
    Trophy Points:
    1
    I think it can't be done, because when You use addon domain it is always used on subdomain address, so users may acces with this two: addon and subdomain.
     
  5. linux-image

    linux-image Well-Known Member

    Joined:
    Jun 8, 2004
    Messages:
    1,192
    Likes Received:
    1
    Trophy Points:
    38
    Location:
    India
    cPanel Access Level:
    Root Administrator
    it can be done .. you need to put a .htaccess file that will over-write the url.

    but say the provision is there at the control panel itself i suppose.. just have a dig there.
     
  6. grefix

    grefix Registered

    Joined:
    Nov 29, 2003
    Messages:
    2
    Likes Received:
    0
    Trophy Points:
    1
    well, I've managed to solve it a couple of hours ago, with the mod rewrite (thus .htaccess). Couldn't post it sooner, sorry 'bout that.

    Thx anyway linux-image :)

    Just for future info (you never know who might have the same problem), I'll give my solution here

    Put this in the .htaccess file located at the subdomains folder

    Code:
    RewriteEngine On
    
    RewriteCond %{HTTP_HOST} ^subdomain.domain.com$ [OR] 
    RewriteCond %{HTTP_HOST} ^[url]www.subdomain.domain.com[/url]$ 
    RewriteRule .* [url]http://otherdomain.com/[/url] [r]
    
    
     
    #6 grefix, Jul 1, 2004
    Last edited: Jul 1, 2004
  7. linux-image

    linux-image Well-Known Member

    Joined:
    Jun 8, 2004
    Messages:
    1,192
    Likes Received:
    1
    Trophy Points:
    38
    Location:
    India
    cPanel Access Level:
    Root Administrator
    thanks grefix :)

    happy to know that the issue is fixed.
     
Loading...
Thread Status:
Not open for further replies.

Share This Page