bcosca / fatfree

A powerful yet easy-to-use PHP micro-framework designed to help you build dynamic and robust Web applications - fast!

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Bug: Using route /app at begining doesn't find anything

natxocc opened this issue · comments

commented

Example:

$f3->('GET /app/first', 'Route->page'); Doesn't work
$f3->('GET /first/app', 'Route->page'); Does work

Nothing with /app at begining does work

This is because .htaccess declaration.

RewriteEngine On
RewriteRule ^(app|dict|ns|tmp)/|.ini$ - [R=404]
RewriteCond %{REQUEST_FILENAME} !-l
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule .* index.php [L,QSA]
RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization},L]

Change the directories you want get access.
For example:

RewriteRule ^(App|dict|ns|tmp)/|.ini$ - [R=404]

Change app for App... and will work!

commented

This is because .htaccess declaration.

RewriteEngine On
RewriteRule ^(app|dict|ns|tmp)/|.ini$ - [R=404]
RewriteCond %{REQUEST_FILENAME} !-l
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule .* index.php [L,QSA]
RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization},L]

Change the directories you want get access.
For example:

RewriteRule ^(App|dict|ns|tmp)/|.ini$ - [R=404]

Change app for App... and will work!

Thanks for this detail! :-)