Welcome Guest, Not a member yet? Register   Sign In
view in restricted access folder with special htaccess does not prompt password.
#1

[eluser]vambavan[/eluser]
I am new to codeigniter and am facing an issue with creating a restricted views subfolder. I have the normal codeigniter htaccess at the CI root and I have some views that I want to restrict access to by using LDAP SSO password protection. So I have those views in a restricted/views under views folder subdirectory with another htaccess that prompts the user for user/password. I know the restricted/views htaccess works as I have tried it with some non codeigniter html and php scripts. However with codeigniter I can access the restricted views without any password prompt and the htaccess in the restricted/views folder seems to be getting ignored. I dont get any type of error when I try to access the restricted view. It gets displayed just like any other view.

Using Codeigniter 2.1.3 running on linux

Folder structure:

webroot:
.htaccess (root)
index.php
ci_app
application
views
restricted
views
.htaccess
restricted_view.php



My root htaccess:
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ /index.php?$1 [L]


Restricted folder htaccess:
RewriteEngine Off
AuthName "ABC: Login with LDAP credentials"
AuthType Basic
AuthBasicProvider "ldap"
AuthLDAPURL ldap://ldap.company.com:389/o=company.com
#require valid-user
require ldap-group cn=GROUPNAME,ou=abcgroups,o=company.com


Messages In This Thread
view in restricted access folder with special htaccess does not prompt password. - by El Forum - 04-10-2013, 10:27 AM



Theme © iAndrew 2016 - Forum software by © MyBB