subdomain and redirect ?

Discussion in 'Apache' started by federal, Sep 14, 2008.

  1. #1
    If a visitor try to enter to a subdomain that not exist (for Example: http://sdfasdf.wqerqdf.dfs.mysite.com ), How i can redirect he to a special address?
    ErrorDocument 404 /yourpagehere.html does not work for subdomain
     
    federal, Sep 14, 2008 IP
  2. Ahoy

    Ahoy Peon

    Messages:
    76
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    0
    #2
    Hi,

    Ur q's it much to general to have a specific answer to it. But here is an idea -

    U can set server to redirect ALL subdomains to a default location using a sort of ASTERIX setting. This can be achived via editing of .HTACCESS root file or via ur control panel.
     
    Ahoy, Sep 14, 2008 IP
  3. federal

    federal Peon

    Messages:
    55
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #3
    How i can do it?
     
    federal, Sep 14, 2008 IP
  4. Ahoy

    Ahoy Peon

    Messages:
    76
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    0
    #4
    Please refer to ur websmaster or inform us of ur sever spec. & control panel type.
     
    Ahoy, Sep 14, 2008 IP
  5. federal

    federal Peon

    Messages:
    55
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #5
    federal, Sep 14, 2008 IP
  6. nimhost

    nimhost Active Member

    Messages:
    235
    Likes Received:
    7
    Best Answers:
    0
    Trophy Points:
    58
    #6
    put this on your httpd.conf

    ErrorDocument 404 /errorfolder/404.html
    Alias /errorfolder/ /path/where/the/file/located/
     
    nimhost, Sep 14, 2008 IP