Take the 2-minute tour ×
WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

I have WordPress running in the public_html directory of my web server (i.e. the primary domain on my account points to this directory). There are subdirectories off of this folder that are for other websites (e.g. /subdomain for the “subdomain.com” website). Some of these websites in subdirectories are edited using FrontPage.

I have found that the .htaccess file in the root, when configured for WP, messes up the FrontPage permissions and makes it impossible to use FrontPage (FrontPage never prompts for authentication and throws a 404 error). From web searches I’ve discovered that others have encountered this problem (e.g. https://my.bluehost.com/cgi/help/375) , but I have not had success implementing the fixes others proposed.

Here are the details:

When this .htaccess file is in the root, FrontPage works fine:

# -FrontPage-

AuthUserFile /home/user/public_html/_vti_pvt/service.pwd
AuthGroupFile /home/user/public_html/_vti_pvt/service.grp


<Limit GET POST>
order deny,allow
deny from all
allow from all
</Limit>
<Limit PUT DELETE>
order deny,allow
deny from all
</Limit>

AuthName myrootdomain.com
IndexIgnore .htaccess */.??* *~ *# */HEADER* */README* */_vti*

I would like to have WP sections in this root .htaccess file and tried to put the following .htaccess file in the top-level public_html directory:

#-FrontPage-

AuthUserFile /home/user/public_html/_vti_pvt/service.pwd
AuthGroupFile /home/user/public_html/_vti_pvt/service.grp

<Limit GET POST>
order deny,allow
deny from all
allow from all
</Limit>
<Limit PUT DELETE>
order deny,allow
deny from all
</Limit>

AuthName myrootdomain.com
IndexIgnore .htaccess */.??* *~ *# */HEADER* */README* */_vti*

RewriteRule ^subdir-name/.*$ - [PT] 

ErrorDocument 404 /index.html
<files wp-config.php>
order allow,deny
deny from all
</files>
Options +FollowSymLinks
RewriteEngine On
RewriteCond %{QUERY_STRING} (\<|%3C).*script.*(\>|%3E) [NC,OR]
RewriteCond %{QUERY_STRING} GLOBALS(=|\[|\%[0-9A-Z]{0,2}) [OR]
RewriteCond %{QUERY_STRING} _REQUEST(=|\[|\%[0-9A-Z]{0,2})
RewriteRule ^(.*)$ index.php [F,L]
<IfModule mod_deflate.c>
AddOutputFilterByType DEFLATE text/html text/plain text/xml text/css application/x-javascript application/xhtml+xml application/xml application/rss+xml application/atom_xml application/x-javascript application/x-httpd-php application/x-httpd-fastphp 
BrowserMatch ^Mozilla/4 gzip-only-text/html
BrowserMatch ^Mozilla/4\.0[678] no-gzip
BrowserMatch \bMSIE !no-gzip !gzip-only-text/html
</IfModule>
Options -Indexes
# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>

# END WordPress

HOWEVER, when the above .htaccess file with WP components is installed, it breaks FrontPage authentication.

The .htaccess file in my _vti_bin file of “subdomainN” (which is a domain edited by FrontPage) looks like this:

# -FrontPage-

Options +FollowSymlinks

<Limit GET POST>
order deny,allow
deny from all
allow from all
</Limit>
<Limit PUT DELETE>
order deny,allow
deny from all
</Limit>
AuthName mydomain.com
AuthUserFile /home/user/public_html/_vti_pvt/service.pwd
AuthGroupFile /home/user/public_html/_vti_pvt/service.grp

… and the .htaccess file in my _vti_aut and _vti_adm subdirectories of subdomain N looks like this:

# -FrontPage-

Options +FollowSymlinks

<Limit GET POST>
order deny,allow
deny from all
allow from all
require group authors administrators
</Limit>
<Limit PUT DELETE>
order deny,allow
deny from all
</Limit>
AuthType Passthrough
AuthName myrootdomain.com
AuthUserFile /home/user/public_html/_vti_pvt/service.pwd
AuthGroupFile /home/user/public_html/_vti_pvt/service.grp

Any suggestions on what I need to tweak to get FrontPage authentication to work AND WP components in the .htaccess file?

share|improve this question
2  
Hi Tim. Thanks for joining WPSE. As this is your first question, I wanted to make you aware that this will be closed. The WPSE FAQ scopes the forum to questions pertaining to WP specifically. Server config questions don't fall within these guidelines. Please refer to: wordpress.stackexchange.com/faq You might try asking your question at Stack Overflow or Server Fault which might yield some quality answers. –  Brian Fegter Sep 17 '12 at 13:58

1 Answer 1

To make sure WordPress catches requests to your blog only you have to restrict the rewrite rules to your domain (host) name.

# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
# must match exactly your domain name
RewriteCond %{HTTP_HOST} ^example\.com$
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>

# END WordPress

And some of your .htaccess directives look a little bit … strange. You don’t need IndexIgnore if you forbid index listings with Options -Indexes.
RewriteEngine On should be called just once.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.