Zend .htaccess VS password protected directory .htaccess

For programming and general questions on Zend Framework

Zend .htaccess VS password protected directory .htaccess

Postby ezeq716 on Mon Nov 04, 2013 2:29 pm

Hi Guys,

We use zend framework for all websites hosted in our server, and I'm facing a situation here where I am not seeing any way out of it and a way to make it work.

My server uses CentOS + php 5.3 + WHM/cPanel.

One of the websites must have a password protected folder: website(dot)com/files/protected_files

But as you guys know, Zend's .htaccess that is currently located in '/home/website/public_html' is not letting '/home/website/public_html/files/protected_files/.htaccess work properly.

If I disable Zend's .htaccess the URL prompts for password and when I type I can see my files, but when I enable Zend's .htaccess it will see that URL as a true URL and will throw up an error that the page cannot be found.

Here is my Zend's .htaccess:

-=-=-=-=-=
Rewriteengine on
RewriteRule !\.(js|txt|ico|gif|GIF|jpg|JPG|png|PNG|css|swf|pdf|xml|XML|eot|svg|ttf|woff)$ index.php
-=-=-=-=-=-=

And this is the .htaccess located in the protected_files

-=-=-=-=
AuthType Basic
AuthName "protected"
AuthUserFile "/home/website/.htpasswds/public_html/files/protected_files/passwd"
require valid-user
-=-=-=-

What am I missing here. Why is it not working?


I did tried enabling Allowoverride AuthConfig / AllowOverride none / AllowOverride all but all of this did not work.
I also tried to put the .htaccess content from protected_files inside httpd.conf but it did not work.

I have root access to the server, so any tip will help!
ezeq716
 
Posts: 1
Joined: Mon Nov 04, 2013 2:20 pm

Return to Zend Framework

Who is online

Users browsing this forum: Google [Bot] and 3 guests