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 code

Discussion in 'Programming' started by dial_w, Oct 22, 2007.

  1. #1
    I need to modify my htaccess file to cause any URL that contains a ? to return a 404 file status.

    I will pay $10 via paypal to the first person who can write me working code.

    Thanks.
     
    dial_w, Oct 22, 2007 IP
  2. undir

    undir Peon

    Messages:
    696
    Likes Received:
    9
    Best Answers:
    0
    Trophy Points:
    0
    As Seller:
    100% - 0
    As Buyer:
    100% - 0
    #2
    I am interested. Please contact me on MSN
     
    undir, Oct 22, 2007 IP
  3. dial_w

    dial_w Peon

    Messages:
    49
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    As Seller:
    100% - 0
    As Buyer:
    100% - 0
    #3
    I added you to messenger but you weren't online at the time. :S
     
    dial_w, Oct 22, 2007 IP
  4. Bishop81

    Bishop81 Peon

    Messages:
    757
    Likes Received:
    21
    Best Answers:
    0
    Trophy Points:
    0
    As Seller:
    100% - 0
    As Buyer:
    100% - 0
    #4
    Try this code:
    
    RewriteEngine on
    RewriteBase /
    RewriteRule ^([-_A-Za-z0-9]+)?([-_A-Za-z0-9]+) pathtoyour404.html [L]
    
    Code (markup):
     
    Bishop81, Oct 22, 2007 IP
  5. dial_w

    dial_w Peon

    Messages:
    49
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    As Seller:
    100% - 0
    As Buyer:
    100% - 0
    #5
    Sorry mate, I tried your code but it returned all pages as 404. I send you a PM about it. :)
     
    dial_w, Oct 22, 2007 IP
  6. VimF

    VimF Well-Known Member

    Messages:
    307
    Likes Received:
    27
    Best Answers:
    0
    Trophy Points:
    118
    As Seller:
    100% - 0
    As Buyer:
    100% - 0
    #6
    Options +FollowSymLinks
    RewriteEngine on
    RewriteBase /
    RewriteRule \? 404.html [L]
    RewriteCond %{QUERY_STRING} .
    RewriteRule . 404.html [L]

    Hope it works
     
    VimF, Oct 22, 2007 IP
  7. dial_w

    dial_w Peon

    Messages:
    49
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    As Seller:
    100% - 0
    As Buyer:
    100% - 0
    #7
    We have a winner. I just sent you a PM VimF.

    Thanks to everyone who responded.
     
    dial_w, Oct 22, 2007 IP