htaccess and FP

D

Doug Mlodzinski

I'm trying to ban a couple of IP addresses from one of my
web sites, and my Host tells me that doing so through their
control panel is not always compatible with FP extensions.

They've suggested I add an ".htaccess" file in the root
directory of my web site. Are there any FP considerations I
need to be aware of for this file, or will a simple file
like this be compatible with FP:

order allow,deny
deny from xx.xx.xxx.xxx
deny from xx.xxx.xxx.xxx
allow from all

TIA.
 
S

Steve Easton

It can't be done using FP because FrontPage will not recognize an .htaccess file.

You need to do it live on the server via the web masters control panel.

As for banning IP addresses, that's really a hit or miss issue.


--
Steve Easton
Microsoft MVP FrontPage
95isalive
This site is best viewed..................
...............................with a computer
 
K

Kulvinder Singh Matharu

I'm trying to ban a couple of IP addresses from one of my
web sites, and my Host tells me that doing so through their
control panel is not always compatible with FP extensions.

They've suggested I add an ".htaccess" file in the root
directory of my web site. Are there any FP considerations I
need to be aware of for this file, or will a simple file
like this be compatible with FP:

I'm going to assume that your webserver is running Apache with
FrontPage Extensions (that's my configuration anyway so I can talk
from experience...apologies if this isn't your setup).

There should be a ".htaccess" file on your webserver (FrontPage does
use it). You should be able to access it by a telnet session or some
other method...your hosting company should tell you how to do that. I
managed to copy the contents of that ".htaccess" file and then saved
it on my WindowsXP machine as htaccess-frontpage.txt. This is always
the baseline file to return to in case anything goes wrong.

Then I made a second copy of this file and named it htaccess.txt. Use
Notepad or something similar to edit this file. Make the appropriate
changes at the end of the file....do not change anything that was
there already! I added a number of commands to tell the Apache server
what to do such as blocking websites, creating custom 404 error
pages, etc.

Once all the changes are made to htaccess.txt I upload this file to
the webserver using an ftp client. Once the file is uploaded I use
the ftp client to rename the file to ".htaccess" (without the quotes
of course).

The file works fine! However, on my system, FrontPage now barfs when
you try to publish your pages (it can't publish anymore). So what I
do when I want to publish is to use the ftp client to upload
htaccess-frontpage.txt to the webserver and once there to rename it
to ".htaccess".

FrontPage is now able to publish. Once I've finished publishing I
upload htaccess.txt to the webserver and rename it to ".htaccess"
again. This gets me back to the situation that I want.

I have heard that other Apache and FP Extensions version combinations
do not have problems with FrontPage publishing to a server with a
modified ".htaccess" file. YMMV.

Good luck!

PS - some good FAQs and uses for the ".htaccess" file :
http://www.htaccesstools.com/htaccess-faq/

--
Kulvinder Singh Matharu
Website : www.metalvortex.com
Contact : www.metalvortex.com/form/form.htm

"It ain't Coca Cola, it's rice", Straight to Hell - The Clash
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top