Welcome Guest, Not a member yet? Register   Sign In
exclude code igniter controller from NTLM authentication
#1

[eluser]KacperK[/eluser]
Hi guys,

Does anyone know how I can exclude one controller (or if possible only one function of that controller) from my NTLM authentication defined in htaccess? It is now active for the whole Code Igniter project (htaccess file is located in the root of de CI project) but I would like to deactive it for, at this moment, one controller.

The contents of the htaccess file now look like this:

DirectoryIndex index.php
RewriteEngine on
RewriteCond $1 !^(index\.php|images|css|js|robots\.txt|favicon\.ico)
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ ./index.php/$1 [L,QSA]

<FilesMatch "/*">
PerlAuthenHandler Apache2::AuthenNTLM
AuthType ntlm,basic
AuthName "NTLM Authentication"
require valid-user
PerlAddVar ntdomain "SECUREPORTAL p2"
PerlSetVar defaultdomain SECUREPORTAL
PerlSetVar splitdomainprefix 1
PerlSetVar ntlmdebug 2
PerlSetVar ntlmauthoritative off
</FilesMatch>


I noticed that it's useless to just exclude the controller file with a regular expression because it will always load index.php (I guess).

Any help would be (very) appreciated Smile


Greetings,


Kacper




Theme © iAndrew 2016 - Forum software by © MyBB