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.

redirect 404 to other website using htaccess, possible?

Discussion in 'Apache' started by jeremynet, Oct 14, 2008.

  1. #1
    Hey gang,

    is it possible to redirect 404 error page to another website using htaccess?

    example.. http://a.com 404 to http://b.com

    thanks
     
    jeremynet, Oct 14, 2008 IP
  2. seismic2

    seismic2 Peon

    Messages:
    27
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    0
    #2
    If you are asking about redirecting users to http://b.com when a 404 error occurs, it's possible.

    But in that case, it will not return a 404 error code, rather a 200 Found code.

    Add this to your .htaccess at http://a.com :
    ErrorDocument 404 http://b.com
    Code (markup):
     
    seismic2, Oct 15, 2008 IP
  3. jeremynet

    jeremynet Active Member

    Messages:
    1,189
    Likes Received:
    16
    Best Answers:
    0
    Trophy Points:
    93
    #3
    Thanks .. !
     
    jeremynet, Oct 15, 2008 IP