0

I have a Joomla 2.5 site set up, and SEO turned on, and "activated" the .htaccess file.

Now the problem is i have a folder which is a special admin site, where some other settings are set and a lot of other stuff, and this folder i can not password protect (with htaccess and htpasswd) if the url rewritting is on for joomla.

Now when i try to access the subfolder:

If url rewritting is on, a get page not found. if its of, i get the password popup. If url rewritting is on and the htaccess file in the subfolder is removed, i can access the subfolder (but without a password popup of course)

So is this possible somehow? or do i need to turn to Sessions for making a custom login to this admin, which i was trying to avoid.

The joomla htaccess looks as follows (i have removed all the comment lines)

Options +FollowSymLinks

RewriteEngine On

RewriteCond %{QUERY_STRING} base64_encode[^(]*\([^)]*\) [OR]
RewriteCond %{QUERY_STRING} (<|%3C)([^s]*s)+cript.*(>|%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]
RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}]
RewriteCond %{REQUEST_URI} !^/index\.php
RewriteCond %{REQUEST_URI} /component/|(/[^.]*|\.(php|html?|feed|pdf|vcf|raw))$ [NC]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule .* index.php [L]

My htaccess and htpasswd file in the subfolder looks like a standard password protetion.

Cœur
  • 37,241
  • 25
  • 195
  • 267
Dan Mikkelsen
  • 286
  • 4
  • 13

1 Answers1

0

If you are just trying to double-protect the backend, you could try Akeeba AdminTools. Even the free version has a feature to password protect the administrator site using .htaccess. I haven't had much experience with the password protecting part of it, but it works great for what I've used it for.

See: https://www.akeebabackup.com/products/admin-tools.html

If you're trying to password protect another folder, make sure the rules you add to the .htaccess are at the top. Also what are you adding to the .htaccess to try to password protect the folder?

Joshua Dwire
  • 5,415
  • 5
  • 29
  • 50