static cookieless domain

Discussion in 'Site & Server Administration' started by webmasterplace, Jun 26, 2010.

  1. #1
    I'm going to serve static content such as images and javascripts from a seperate cookiesless domain instead from loading it directly from my main domain.

    I've bought mystatic.com and added this as an Addon domain in cPanel. I've set the path to the same path as my main domain (mysite.com), so I can access files easily (mystatic.com/images/bla.jpg is the same as mysite.com/images/bla.jpg).

    The problem now is, that when I visit mystatic.com, I see the same site as mysite.com. I don't want people to see anything when they visit mystatic.com. How can I do that?

    I thought about a redirect, but I'm not sure about this.

    So I want: when someone visits mystatic.com -> he sees white page
    When he visits mysite.com -> he ofcourse sees the website, with static content served from mystatic.com


    Thanks for the help!
     
    webmasterplace, Jun 26, 2010 IP
  2. webmasterplace

    webmasterplace Peon

    Messages:
    802
    Likes Received:
    36
    Best Answers:
    0
    Trophy Points:
    0
    #2
    Solved the issue myself.
    I just pointed the addon domain to a new path and put an empty index file there.
    Then used subdomains.

    Topic can be closed!
     
    webmasterplace, Jun 26, 2010 IP
  3. CSM

    CSM Active Member

    Messages:
    1,047
    Likes Received:
    25
    Best Answers:
    0
    Trophy Points:
    55
    #3
    You could also use a .htaccess redirection. Maybe the best way.
    Empty index.html and index.php is a good solution too.
     
    CSM, Sep 21, 2010 IP
  4. jocurileus

    jocurileus Peon

    Messages:
    53
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    0
    #4
    You can use .htaccess to allow access only from you new domain and redirect/show an empty page to everyone else.
     
    jocurileus, Sep 22, 2010 IP
  5. ivan.kristianto

    ivan.kristianto Active Member

    Messages:
    136
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    51
    #5
    ivan.kristianto, Sep 24, 2010 IP
  6. zaken5000

    zaken5000 Greenhorn

    Messages:
    1
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    11
    #6
    if host supports .htaccess files
     
    zaken5000, Apr 12, 2012 IP
  7. Techmafia

    Techmafia Well-Known Member

    Messages:
    678
    Likes Received:
    5
    Best Answers:
    0
    Trophy Points:
    108
    #7
    Happy that u have the error fixed, but getting a static domain and adding it to same server (host) as addon domain will result in load to the same physical server

    it would not be of much use at all as all requests will be given to same server and in high traffic, it can be a bottleneck !
     
    Techmafia, Apr 15, 2012 IP