M
M
mpetrunin2012-07-03 15:53:43
Apache HTTP Server
mpetrunin, 2012-07-03 15:53:43

How to disable .htaccess or limit its effect depending on the request URL?

I'm using Kerberos-based authorization and I'd like to disable it for the root URL: mysite.com/. But for all other pages, I would like it to work as before, for example for mysite.com/page1.

This is how my .htaccess is configured:

AuthType Kerberos
AuthName "Domain login"
KrbAuthRealms DOMAIN.COM
KrbMethodK5Passwd on
Krb5KeyTab /etc/httpd/httpd.keytab
require valid-user


I would like to disable this functionality for the root url. Alternatively, disable all .htaccess in the virtual host config for the root URL. But unfortunately I don't know how to do it.

A piece of my vhost.conf:
<Directory /home/user/www/current/public/>
            Options -MultiViews +FollowSymLinks
            AllowOverride All
            Order allow,deny
            Allow from all
</Directory>


I would be grateful for any advice

Answer the question

In order to leave comments, you need to log in

2 answer(s)
M
mpetrunin, 2012-07-09
@mpetrunin

Asked a similar question on ServerFault.
I also posted my solution there: serverfault.com/questions/404149/how-can-i-disable-kerberos-authentication-for-only-the-root-of-my-site/404315#comment423167_404315

M
morello, 2012-07-03
@morello

Too bad we can't check right now. But try setting your .htacces to something similar to:
<Files index.php>
AuthType Kerberos
AuthName "Domain login"
KrbAuthRealms DOMAIN.COM
KrbMethodK5Passwd on
Krb5KeyTab /etc/httpd/httpd.keytab
require valid-user

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question