RewriteEngine On
RewriteBase /base_php/codes
RewriteCond $1 !^(index\.php|public|res|robots\.txt)
RewriteRule ^(.*)$ index.php?_path_=$1 [L,QSA]
ErrorDocument 404 /index.php?_error_=404.php
ErrorDocument 500 /index.php?_error_=500.php
RewriteBase /base_php
, where base_php/codes
is the root dir like [http://localhost/base_php/codes](http://localhost/base_php/codes)
.
If Root like [http://localhost/](http://localhost/)
, write RewriteBase /
,
public
andres
folder and subfolders are ignored in path.- Other all path are pass by CGI to the
index.php
, routes are defined atroutes.php
- All config variables available at
config.php
- Error page available at
error
folder, server errors reports asErrorDocument 404 /index.php?_error_=404.php
in.htaccess
. or other error report asredirectError
atroute_logic.php
. - Write all logic inside
src
folder.
- I love to hear your valuable feedbacks, suggestions & issues. Please raise a issue on the repo or email me (as subject: 'base_php#issue <topic>') @
[email protected]
.
❤️ Voila! Happy coding...