PHPLD Code needed for redirection to custom error page.

Discussion in 'Directories' started by paidhosting, Jan 21, 2007.

  1. #1
    Hello,
    I would like to redirect all not found pages to some custom error page , but the mod_rewrite does not allow that, is there a way i can have custom error page instead of getting redirected to main site ?? I would like rewrite to function still.

    Regards
     
    paidhosting, Jan 21, 2007 IP
  2. paidhosting

    paidhosting Peon

    Messages:
    4,822
    Likes Received:
    483
    Best Answers:
    0
    Trophy Points:
    0
    #2
    Found the solution.

    Just replace
    
    RewriteRule .* index.php [QSA,L] 
    
    Code (markup):
    With

    
    RewriteRule   ^(.+)          http://www.somedomain/404.htm
    
    Code (markup):
    Enjoy
     
    paidhosting, Jan 21, 2007 IP
  3. aspidov

    aspidov Well-Known Member

    Messages:
    2,875
    Likes Received:
    272
    Best Answers:
    0
    Trophy Points:
    175
    #3
    I think that will redirect everything to 404 page... not sure though
     
    aspidov, Jan 21, 2007 IP
  4. paidhosting

    paidhosting Peon

    Messages:
    4,822
    Likes Received:
    483
    Best Answers:
    0
    Trophy Points:
    0
    #4
    paidhosting, Jan 21, 2007 IP
  5. aspidov

    aspidov Well-Known Member

    Messages:
    2,875
    Likes Received:
    272
    Best Answers:
    0
    Trophy Points:
    175
    #5
    aspidov, Jan 21, 2007 IP