2012-08-22

Hi,

I have a Joomla 2.5 site on Dreamhost. I installed it using their "One-Click Installer" app.

Problem:

I have 2 folders that I want to password protect. One is the 'administrator' folder and the other is a folder that has files linked to it where only our membership can access. They are given a username and password. It's a url like "www.site.com/dir1/dir2/file.pdf."

Both are configured the same through the Web Panel: Main > Goodies > Htaccess/WebDAV. I have the directory filled in, "Password-protect this dir?" checked, "WebDAV" unchecked, directory "name" filled in, "User accounts for this area" is populated, "Forbid linking to files in this dir?" checked, and "Forbidden file extensions" are the defaults.

When browsing to either directory, I get one of two errors. These are the errors from Joomla.

Quote:404 - Article not found

You may not be able to visit this page because of:

an out-of-date bookmark/favourite

a search engine that has an out-of-date listing for this site

a mistyped address

you have no access to this page

The requested resource was not found.

An error has occurred while processing your request.

Please try one of the following pages:

Home Page

If difficulties persist, please contact the System Administrator of this site and report the error below..

Article not found

Quote:404 - Category not found

You may not be able to visit this page because of:

an out-of-date bookmark/favourite

a search engine that has an out-of-date listing for this site

a mistyped address

you have no access to this page

The requested resource was not found.

An error has occurred while processing your request.

Please try one of the following pages:

Home Page

If difficulties persist, please contact the System Administrator of this site and report the error below..

Category not found

Troubleshooting:

When I say "works" I mean I get the username & password box in the web browser when browsing to one of the folders protected with Htaccess. I can use a username & password and access the content as expected. "Does not work" means I get one of the errors above.

Here are the results when I change some of the configuration settings:

Code:

public $sef = '1';

public $sef_rewrite = '1';

Is the settings I would like to have, but obviously does not work.

Code:

public $sef = '0';

public $sef_rewrite = '1';

Works.

Code:

public $sef = '1';

public $sef_rewrite = '0';

Does not work.

Code:

public $sef = '0';

public $sef_rewrite = '0';

Works.

I have the htaccess.txt file copied over to .htaccess in the root public folder. I made no other changes to this file. If I comment out RewriteEngine, it works too.

Code:

#RewriteEngine On

If I generate my own .htaccess and .htpasswd files, it does not work.

I had a very similar problem in Joomla 1.5 and Dreamhost Support actually found a post that worked around the issue. http://forum.joomla.org/viewtopic.php?p=...5#p1224025 I spent about 5 minutes trying to make the fix work in 2.5 with no success.

The 1.5 site I had on another provider before I moved it (copied the files and database, and re-pointed the configuration file) to Dreamhost and had 0 issues with .htaccess files protecting directories. I also had a "test" environment where this doesn't happen, but I only used a LAMP stack with ModRewrite enabled in Apache and I realize the configuration is vastly different. It's my feeling that it's something with Dreamhost's configuration. However, I contacted them about this issue with Joomla 2.5 and they suggested I post in this forum and the Joomla forum.

Thanks in advance!

Show more