2

I have a KISSMVC php based site with the following .htaccess to allow only authenticated users to see the site

RewriteEngine On

RewriteBase /myphpsite/

RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^(.*)$ index.php?/$1 [L]

# Protect app files
RewriteRule ^((app|system|scripts).*)$ index.php/$1 [L]

AuthName "Please enter your username and password"
AuthType Basic
<Limit GET>
require user THEUSERNAME
</Limit>

This works with no problem.

The problem is that I want to allow clients to retrieve a value from the site with no authentication. This value is obtained through the index.php function because it is calculated per client, plus there is no folder structure where these values are stored.

as an example this URL should not prompt:

http://fancywebsite.com/myphpsite/index.php/inventory/hash/variable

but this one should still be prompting:

http://fancywebsite.com/myphpsite

If I could somehow specify in the .htaccess file to bypass or satisfy the authentication when the requested URL contains "index.php/inventory/hash" that would be perfect.

Aziz Shaikh
  • 16,245
  • 11
  • 62
  • 79
Ixcqc4cGF
  • 181
  • 1
  • 5

0 Answers0