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. 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-)
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!
Incidentally, here's a review of a nice tool for generating .htaccess statements. Or, if you prefer to do it yourself, see the Apache htaccess tutorial.
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 , 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..
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.
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?
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.
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...