roemermeier/PinePHP/master/.htaccess
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
#Uncomment to ensure use of "www" in the domain. http://example.com => http://www.example.com
#RewriteCond %{HTTP_HOST} !^www..* [NC]
#RewriteRule ^(.*) http://www.%{HTTP_HOST}/$1 [R=301]
#index page => to change, visit config.php
RewriteCond %{ENV:REDIRECT_STATUS} ^$
RewriteRule ^/?$ router.php [NC,L]
#Link-through to vendor files using VENDOR_PATH_EXTERNAL (see config.php)
RewriteCond %{ENV:REDIRECT_STATUS} ^$
RewriteRule ^lib/(.*)$ vendor/$1 [NC,L]
#Provide access to admin system
RewriteCond %{ENV:REDIRECT_STATUS} ^$
RewriteRule ^admin/(.*)/(.*)$ admin.php?v=$1&$2 [NC,L]
#Direct access to developertool
RewriteCond %{ENV:REDIRECT_STATUS} ^$
RewriteRule ^system/developertool/(.*)$ system/developertool/$1 [NC,L]
#PHP and HTML pages are routed to router.php
RewriteCond %{ENV:REDIRECT_STATUS} ^$
RewriteRule ^([a-zA-Z0-9-_]+).(php|html|htm)[?]?(.*)$ router.php?p=$1&ext=$2&%{QUERY_STRING} [NC,L]
#Direct Link-through to everything else
RewriteCond %{REQUEST_URI} !^(.*)app/(.*)$
RewriteCond %{ENV:REDIRECT_STATUS} ^$
RewriteRule ^(.*)$ app/$1 [L]
#Error page redirects
#ErrorDocument 400 app/error/400.php
#ErrorDocument 401 app/error/401.php
#ErrorDocument 403 app/error/403.php
#ErrorDocument 404 app/error/404.php
#ErrorDocument 500 app/error/500.php
</IfModule>
On Github License
Files
Download PDF of Htaccess file