View Full Version : FP Extensions and .htaccess
polarmate
09-11-2003, 12:32/12:32PM
Can someone explain why FP extensions and .htaccess cannot co-exist for a web site?
I have a web site on an Apache Server and I use FP to publish files. I added a .htaccess file to the site in order to redirect the non-www domain to the www version. I found that the FP server extensions were uninstalled. I thought that there may have been some re-configuration on the web server and so they reset the FP extensions.
When I attempted to install FP extensions, this is what I got:
Warning: It is recommended that you DO NOT install FrontPage Extensions on your account unless you intend to publish your site directly from the FrontPage application.
Uninstalling the extensions from the main domain will uninstall the extensions from all subdomains and addon domains. Uninstalling will also remove all .htaccess files in your web root (public_html). You must have the extensions installed on the main domain before they can be installed on any subdomains or addon domains.
Installing or uninstalling FrontPage Extensions will result in the loss of all .htaccess files in your web area. Any directories you have protected with WebProtect will become unprotected until you reprotect them.
What is it about FP extensions and .htaccess that the two cannot co-exist?
Bernard
09-11-2003, 14:10/02:10PM
I don't use FrontPage, but I just tonight I read a post where someone says that they cannot publish their site with FrontPage anymore because they tried to modify their .htaccess file to enable a custom 404:
http://forum.valueweb.net/showthread.php?s=&threadid=43
polarmate
09-11-2003, 14:12/02:12PM
Yes, Bernard - because if you upload a .htaccess file, FP Extensions get turned off. If you turn FP extensions on (in order to publish your site and whatever else), the .htaccess file gets deleted. My question is why? What is it that makes these two things mutually exclusive?
polarmate
09-11-2003, 14:32/02:32PM
Here is what I am doing currently:
1. Install FP extensions
2. Publish file
3. Upload .htaccess
It's painful but it works. I am going to have to switch to another editor for this web site. I think this might be the time to try HTML-Kit.
qwerty
09-11-2003, 16:35/04:35PM
AFAIK, FP extensions will run on an Apache server, but they're not fully supported by anything but IIS, and IIS doesn't use .htaccess. I used to have an FP-based site on an Apache server, and I had to move it to IIS when my hosting company told me they couldn't guarantee all the FP stuff would work.
Are you actually using the FP server extensions, or is it just that you're generating and uploading pages with FP? If you're not using FP to run things like forms, you can just use FP as your editor and upload via FTP.
bigDugan
09-11-2003, 21:41/09:41PM
Can someone explain why FP extensions and .htaccess cannot co-exist for a web site?I have both FP extentions and .htaccess on the same web. But it sounds like your procedures are a bit different. In my case, after I installed the FP extentions, I created a .htaccess file for a subdirectory through the command prompt (SSH) on the web. And everything has been working fine. I use FP to upload files, and the .htaccess to restrict access to a subdir. I'm wondering if it could just be a limitation of the user interface appliaction you are using?
polarmate
10-11-2003, 05:10/05:10AM
Bob, I don't use FTP programs. I use command line ftp because the various ftp programs I have tried thus far would either hang or crash my computer or tell me that a file is being uploaded when in fact it was doing nothing. With command line ftp, I know what I am doing and I feel more in control. It also reminds me of DOS days, as in the OS and not Denial of Service :p ...
bigD, doesn't .htaccess have to reside in the root folder for the web site? I upload the .htaccess file to the www folder.
I don't have admin rights on the server - I am just a lowly user. There is a cpanel using which I can install or uninstall FP extensions. When I upload my .htaccess file, FP extensions get uninstalled and when I install the FP extensions, using cpanel, my .htaccess file is deleted. I am hosting with Lenz Multimedia.
I figured if I have more info on this then I could tackle this issue with them. I just like the one-click publish that FP gives me besides being my editor of choice. I don't use any of the other FP features - like includes or counters or forms or anything else.
ArmenT
14-11-2003, 18:32/06:32PM
.htaccess doesn't necessarily have to exist on the root directory of a website. It can be in any directory and the contents of the .htaccess in that directory will apply to any subdirectories below it. If you put it in a root directory, it will apply to all other subdirectories below it, but if you put it in a subdirectory, it will apply to that subdirectory and every other directory within that subdirectory only.
.htaccess is an apache only file and FP was originally developed for IIS (which doesn't use .htaccess at all). The FP extensions on Apache is an add-on module that emulates IIS functionality on an Apache server. Since IIS doesn't use htaccess at all, I would guess that turning on the Front Page Emulation mode on deletes the .htaccess, so that it can simulate an IIS environment. That's just my theory though, and I could be full of the proverbial stuff.
polarmate
14-11-2003, 19:46/07:46PM
:hi: ArmenT and welcome to the forums!!
That's pretty much the same conclusion I came to - but I had nothing to back it up with. What is worse I know very little about Apache servers and scripting .htaccess. :rolleyes:
If I can have a .htaccess file in my root folder and another version in another sub folder - does the latter override the former completely or is there a concept of inheritance?
ArmenT
15-11-2003, 05:29/05:29AM
Thanks for the welcome polarmate :D. To answer your question, Apache uses a script merging hierarchy, so the settings will be merged rather than overridden. Let's say someone requests a file from /polar/mate/file.html. In this case, Apache will search the following directories in this order for .htaccess:
/
/polar/
/polar/mate/
The contents of any .htaccess files in these directories will be read in the above order and merged together and the net set of contents will be evaluated. So, if you had one set of directives in /.htaccess, another in /polar/.htaccess and another set in /polar/mate/.htaccess, Apache will merge the three files together and treat them as one big file. Any instructions in /.htaccess that are in common will be replaced by the ones in /polar/mate/.htaccess, since it is read later.
See this Apache Manual (http://apache-server.com/tutorials/ATusing-htaccess.html#merging) for more.
polarmate
15-11-2003, 10:13/10:13AM
Thanks for that info, ArmenT. That made a lot of sense until I played with it a bit and got confused all over again.
I found the .htaccess that FP places in my root folder. It looks 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 www.mydomain.com
AuthUserFile /home/<username>/public_html/_vti_pvt/service.pwd
AuthGroupFile /home/<username>/public_html/_vti_pvt/service.grp
Since I need the 301 redirect code in the root folder where FP needs its file to be also, I added my 301 redirect code to the FP .htaccess. Doesn't work. FP extensions are uninstalled. :(
Is this because of the IndexIgnore statement. Do you think I can lose it?
ArmenT
15-11-2003, 17:41/05:41PM
The IndexIgnore directive is to tell Apache not to list certain files, if it is configured to show a directory contents (and index.html is not present of course).
http://httpd.apache.org/docs/mod/mod_autoindex.html#indexignore
ihelpyou
16-11-2003, 02:05/02:05AM
Hi Armen, Thanks a bunch for making very helpful posts! Please keep it up! :)
vBulletin® v3.7.3, Copyright ©2000-2008, Jelsoft Enterprises Ltd.