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.

blocking linking urls

Discussion in 'Apache' started by joeblack316, Sep 7, 2004.

  1. #1
    Hi everyone,

    I have this small problem. There is some sneaky bugger who redirecting everyone straight from their site onto ours without our permission. Their just being plain lazy and cant be arsed to build thier own site.. You may ask why is this bad it just means more hits for us.. but unfortunatly we've had so many problems from this person that we just wanna black list him from anything we do. :eek:
    SEMrush
    Is there a way to block him from redirecting people to our site without having to edit the .htaccess file (cant use this as all our extentions are done in frontpage).

    Any help would be appriciated
    Cheers
    R-)
     
    joeblack316, Sep 7, 2004 IP
    SEMrush
  2. digitalpoint

    digitalpoint Overlord of no one Staff

    Messages:
    38,297
    Likes Received:
    2,602
    Best Answers:
    461
    Trophy Points:
    710
    Digital Goods:
    29
    #2
    Have you tried to do it with .htaccess? I'm not so sure that using it actually hurts FrontPage.
     
    digitalpoint, Sep 7, 2004 IP
  3. minstrel

    minstrel Illustrious Member

    Messages:
    15,082
    Likes Received:
    1,243
    Best Answers:
    0
    Trophy Points:
    480
    #3
    In most cases, it won't hurt.

    However, Frontpage does add an .htaccess file to the root directory on *nix servers -- generally this just hides certain files and directories to protect them. The FrontPage publish routines also hide the .htaccess file from you, presumably because MS doesn't trust you to edit it.

    Safest Way
    However, you can edit it just fine and safely (I have done so several times): Using a third party FTP program (I'd recommend AceFTP first; WS_FTP second), set it to show hidden files. Then copy .htaccess to your hard drive, edit it by ADDING any lines you need to the bottom of what FP has already placed there, and Microsoft Bob's Your Uncle!
     
    minstrel, Sep 7, 2004 IP
  4. minstrel

    minstrel Illustrious Member

    Messages:
    15,082
    Likes Received:
    1,243
    Best Answers:
    0
    Trophy Points:
    480
    #4
    minstrel, Sep 7, 2004 IP
  5. Redleg

    Redleg Raider

    Messages:
    360
    Likes Received:
    5
    Best Answers:
    0
    Trophy Points:
    0
    #5
    I use Frontpage and prevent hotlinking with .htaccess on one of my sites.

    But you need to do a couple of things in order to get it working.

    First of all backup your existing .htaccess file to your computer.

    copy that one (don't overwrite it) and add the code listed below to the bottom of it.
    replace yourdomain.com with your domain... :)

    upload the new file to your server, and you're "protected" from hotlinking..
    But you need to upload the old .htaccess before you publish pages from frontpage again.

    In the "rewriterule" line you can add .htm (or whatever extension he's linking to).

    If he tries to link directly to your site from his, the image http://www.yourdomain.com/no.jpe will be displayed instead..

    In my case it displays [​IMG], but you can use your imagination and replace it wathever you want to.. ;)

    Sneaky, but it works, and it may give you some free advertising for your site as well.. :cool:
     
    Redleg, Sep 7, 2004 IP
  6. minstrel

    minstrel Illustrious Member

    Messages:
    15,082
    Likes Received:
    1,243
    Best Answers:
    0
    Trophy Points:
    480
    #6
    No you don't...

    If you append any new lines to the original FrontPage ones, as you have suggested, you should be okay and you should NOT have to upload the original frontPage version to republish -- heck, if I had to do that every day, I'd find another way.

    For some sites, FP actually seems to be quite happy even if the original lines are deleted, although I would recommend the safer procedures outlined in this thread.
     
    minstrel, Sep 7, 2004 IP
  7. Redleg

    Redleg Raider

    Messages:
    360
    Likes Received:
    5
    Best Answers:
    0
    Trophy Points:
    0
    #7
    FP refuses to upload new pages if I don't upload the old .htaccess file first..
     
    Redleg, Sep 7, 2004 IP
  8. minstrel

    minstrel Illustrious Member

    Messages:
    15,082
    Likes Received:
    1,243
    Best Answers:
    0
    Trophy Points:
    480
    #8
    How odd... what version of FP? what is IN your original .htaccess file? what server is it the site on?

    I'm on Linux apache server, FP 2002, SE 2002.

    My original .htaccess looked like this:
    # -FrontPage-
    
    IndexIgnore .htaccess */.??* *~ *# */HEADER* */README* */_vti*
    
    <Limit GET POST>
    order deny,allow
    deny from all
    allow from all
    </Limit>
    <Limit PUT DELETE>
    order deny,allow
    deny from all
    </Limit>
    AuthName <domain here>
    AuthUserFile <path to password here>
    AuthGroupFile <path to service.grp here>
    Code (markup):
    I then added several lines after it and FP has been happy.

    One other question: what did you use to edit the .htaccess file and how did you upload it to the site? If an FTP program, did you ensure that it was uploaded in ascii mode, not binary?
     
    minstrel, Sep 7, 2004 IP
  9. Redleg

    Redleg Raider

    Messages:
    360
    Likes Received:
    5
    Best Answers:
    0
    Trophy Points:
    0
    #9
    Linux apache, FP 2002, similar .htaccess file, made in notepad and uploaded in ascii mode (FTP)..

    All I did was to add the rewrite code I listed above to the end of the file..

    If I try to upload without the old .htaccess file installed FP just tells me that FP extensions haven't been installed on the server.
    But it works if I upload the old file again.

    It's really no big deal to switch between the two .htaccess files, but it would have been nice to be able to publish the pages without have to use FTP first.
     
    Redleg, Sep 8, 2004 IP
  10. minstrel

    minstrel Illustrious Member

    Messages:
    15,082
    Likes Received:
    1,243
    Best Answers:
    0
    Trophy Points:
    480
    #10
    How very odd... I'm also using FP2002 on Linux Apache and I never have to do that.

    What version of the server extensions? Also 2002? I think I'll post this for the mavens in the Microsoft FP group...
     
    minstrel, Sep 8, 2004 IP
  11. Redleg

    Redleg Raider

    Messages:
    360
    Likes Received:
    5
    Best Answers:
    0
    Trophy Points:
    0
    #11
    I've sent you a PM..
     
    Redleg, Sep 8, 2004 IP