Conflict between RewriteEngine and password protected dir?

Conflict between RewriteEngine and password protected dir?

am 19.06.2007 16:31:48 von dr.bob.says.no.to.spammm

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

Re: Conflict between RewriteEngine and password protected dir?

am 19.06.2007 18:17:56 von shimmyshack

On Jun 19, 3:31 pm, "Dr.Bob"
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

Re: Conflict between RewriteEngine and password protected dir?

am 19.06.2007 23:44:50 von dr.bob.remove.this.to.prevent.spam

"shimmyshack" wrote in message
news:1182269876.360686.187010@g4g2000hsf.googlegroups.com...
> On Jun 19, 3:31 pm, "Dr.Bob"
> 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