Conflict between RewriteEngine and password protected dir?

This is a discussion on Conflict between RewriteEngine and password protected dir? within the Apache Web Server forums, part of the Web Server and Related Forums category; Dear group, hope you can help with the following: In the root of my site I have a .htaccess with: ...


Go Back   Usenet Forums > Web Server and Related Forums > Apache Web Server

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 06-19-2007
Dr.Bob
 
Posts: n/a
Default Conflict between RewriteEngine and password protected dir?

Dear group, hope you can help with the following:

In the root of my site I have a .htaccess with:
RewriteEngine On
RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]

I also have a subdir /admin with the CMS of the site.

But now I run into the following: during testing I had no password
protection on that /admin-dir, and that dir was normally accessible. But no
I wanted to give it some protection via a .htaccess in that /admin dir, and
now this url domain.com/admin automatically redirects/rewrites to the root
of the site, so without even asking for a login!

The .htaccess of that /admin page is
AuthType Basic
AuthName "login"
AuthUserFile "/home/path/to/passwd/file"
require valid-user


Is there a solution to use both that RewriteEngine and the htaccess-login in
a dir below the webroot?

Thanks in advance!
Bob


  #2 (permalink)  
Old 06-19-2007
shimmyshack
 
Posts: n/a
Default Re: Conflict between RewriteEngine and password protected dir?

On Jun 19, 3:31 pm, "Dr.Bob" <dr.bob.says.no.to.spa...@xs4all.nl>
wrote:
> Dear group, hope you can help with the following:
>
> In the root of my site I have a .htaccess with:
> RewriteEngine On
> RewriteBase /
> RewriteCond %{REQUEST_FILENAME} !-f
> RewriteCond %{REQUEST_FILENAME} !-d
> RewriteRule . /index.php [L]
>
> I also have a subdir /admin with the CMS of the site.
>
> But now I run into the following: during testing I had no password
> protection on that /admin-dir, and that dir was normally accessible. But no
> I wanted to give it some protection via a .htaccess in that /admin dir, and
> now this url domain.com/admin automatically redirects/rewrites to the root
> of the site, so without even asking for a login!
>
> The .htaccess of that /admin page is
> AuthType Basic
> AuthName "login"
> AuthUserFile "/home/path/to/passwd/file"
> require valid-user
>
> Is there a solution to use both that RewriteEngine and the htaccess-login in
> a dir below the webroot?
>
> Thanks in advance!
> Bob


RewriteCond %{REQUEST_URI} !/admin
something like that

  #3 (permalink)  
Old 06-19-2007
Dr.Bob
 
Posts: n/a
Default Re: Conflict between RewriteEngine and password protected dir?

"shimmyshack" <matt.farey@gmail.com> wrote in message
news:1182269876.360686.187010@g4g2000hsf.googlegro ups.com...
> On Jun 19, 3:31 pm, "Dr.Bob" <dr.bob.says.no.to.spa...@xs4all.nl>
> wrote:
>> Dear group, hope you can help with the following:
>>
>> In the root of my site I have a .htaccess with:
>> RewriteEngine On
>> RewriteBase /
>> RewriteCond %{REQUEST_FILENAME} !-f
>> RewriteCond %{REQUEST_FILENAME} !-d
>> RewriteRule . /index.php [L]
>>
>> I also have a subdir /admin with the CMS of the site.
>>
>> But now I run into the following: during testing I had no password
>> protection on that /admin-dir, and that dir was normally accessible. But
>> no
>> I wanted to give it some protection via a .htaccess in that /admin dir,
>> and
>> now this url domain.com/admin automatically redirects/rewrites to the
>> root
>> of the site, so without even asking for a login!
>>
>> The .htaccess of that /admin page is
>> AuthType Basic
>> AuthName "login"
>> AuthUserFile "/home/path/to/passwd/file"
>> require valid-user
>>
>> Is there a solution to use both that RewriteEngine and the htaccess-login
>> in
>> a dir below the webroot?
>>
>> Thanks in advance!
>> Bob

>
> RewriteCond %{REQUEST_URI} !/admin
> something like that
>


Thanks Shimmyshack, will give it a try!

Bob

 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are Off
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT +1. The time now is 10:33 PM.


Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.0.0