Dreamhost and Htaccess causing Joomla 404 errors


#1

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]

[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[/quote]

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:

public $sef = '1'; public $sef_rewrite = '1';

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

public $sef = '0'; public $sef_rewrite = '1';

Works.

public $sef = '1'; public $sef_rewrite = '0';

Does not work.

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.

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=1224025#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!


#2

Hey there! We have another suggestion, actually. You may need to delete the Htaccess setup that was done through our panel (it sets perms differently), and generate your own .htaccess based on these instructions: http://docs.joomla.org/Security_and_Per … taccess.3F

From there you can rebuild any broken URLs, and reinsert the other .htaccess directives manually. You might also consider searching for (or collect suggestions for here) a mod/extension that would perform the same security functions you’re going for. If there’s still any trouble, you can reach me at seanh[at]support.dreamhost.com


#3

Saw your post in the Joomla forum. I responded there http://forum.joomla.org/viewtopic.php?f=624&t=739044


#4

well… i found the suggestions by the above users, and any ideas more?


#5

Happy to report this issue is resolved. See Joomla thread link above.