|
Home > Archive > Apache Server configuration support > June 2007 > Conflict between RewriteEngine and password protected dir?
You are viewing an archived Text-only version of the thread.
To view this thread in it's original format and/or if you want to reply to
this thread please [click here]
| Author |
Conflict between RewriteEngine and password protected dir?
|
|
| Dr.Bob 2007-06-19, 1:31 pm |
| 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
| |
| shimmyshack 2007-06-19, 1:31 pm |
| 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
| |
| Dr.Bob 2007-06-19, 7:24 pm |
| "shimmyshack" <matt.farey@gmail.com> wrote in message
news:1182269876.360686.187010@g4g2000hsf.googlegroups.com...
> On Jun 19, 3:31 pm, "Dr.Bob" <dr.bob.says.no.to.spa...@xs4all.nl>
> wrote:
>
> RewriteCond %{REQUEST_URI} !/admin
> something like that
>
Thanks Shimmyshack, will give it a try!
Bob
|
|
|
|
|