1. Advertising
    y u no do it?

    Advertising (learn more)

    Advertise virtually anything here, with CPM banner ads, CPM email ads and CPC contextual links. You can target relevant areas of the site and show ads based on geographical location of the user if you wish.

    Starts at just $1 per CPM or $0.10 per CPC.

.htaccess 404 for subdomains

Discussion in 'Programming' started by dhuang90, Nov 2, 2010.

  1. #1
    how do you redirect all 404 traffic from a particular subdomain to a page? THX in advance!!
     
    dhuang90, Nov 2, 2010 IP
  2. bitist

    bitist Peon

    Messages:
    28
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    0
    #2
    You should create a .htaccess file in your subdomain and add this line:
    ErrorDocument 404 /404.html
    Code (markup):
    When a page is not found that will be redirected to 404.html which also should be available on your subdomain.
     
    bitist, Nov 8, 2010 IP
  3. deepakg

    deepakg Peon

    Messages:
    48
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    0
    #3
    404 Errors on non-primary domains - Non-primary domains that point to your hosting account's root do not require any special configuration. For example, if you used this .htaccess file:
    ErrorDocument 404 /notfound.php
    
    Code (markup):
     
    deepakg, Nov 11, 2010 IP