Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 5 of 5
  1. #1
    Regular Coder
    Join Date
    Jan 2005
    Posts
    189
    Thanks
    6
    Thanked 0 Times in 0 Posts

    Best way to Block unwanted referrals in htaccess?

    We had a really old php link redirect script on a website that has basically been piggybacked off of and passed around. So our web server was getting hit with a ton of requests for this specific page, lets call it "redirect.php" So there would be people coming from "redirect.php?http://www.mywebsite.com" etc...

    We've deleted the file on our server, but now everyone who is being pointed to or is using this script, is getting our 404 error page, and it's eating up a lot of bandwidth. I'm just curious what the best way to handle this would be. Would I be able to use htaccess to simply block all http requests for "redirect.php" on our site and stop it from going to the 404 page?

  • #2
    Regular Coder
    Join Date
    Oct 2004
    Posts
    371
    Thanks
    0
    Thanked 20 Times in 20 Posts
    Create an empty "redirect.php" file and they will only get minimal http headers returned.

  • #3
    Regular Coder
    Join Date
    Jan 2005
    Posts
    189
    Thanks
    6
    Thanked 0 Times in 0 Posts
    I ended up using htaccess to redirect that specific page to a blank page vs. the standard 404 page we use. I guess my question was whether requests to that page could just be totally denied. It's still using up some resources now but minimal.

  • #4
    New Coder
    Join Date
    Jun 2005
    Location
    Blackpool. UK
    Posts
    98
    Thanks
    0
    Thanked 4 Times in 4 Posts
    <Files redirect.php>
    deny from all
    </Files>

  • #5
    New Coder
    Join Date
    Sep 2014
    Posts
    41
    Thanks
    0
    Thanked 1 Time in 1 Post
    Most referer junk is not real hyperlinks or guests to your website. Examine your accessibility records to discover the collections that display a referer and see whether it is a individual kind check out or not. Nine periods out of ten you will see a few referers (I usually see them 3 in a row)you will see them all demand the same URL, not actally running the assisting information for the website or picture asked for and no more. Look at the IP deal with and look into the whois. If it is a server village, prevent them or there will be new photoshopped referers every day, or every few time.


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •