htfaker
[CHANGELOG], (*1)
htfaker is a router script that emulates
Apache .htaccess
functionality for the
PHP built-in web server., (*2)
Install
Example install:, (*3)
composer require attogram/htfaker
Usage
Example usage:, (*4)
cd vendor/attogram/htfaker
php -S localhost:8080 router.php
then open http://localhost:8080/ in your web browser., (*5)
Status
htfaker is in the startup stage., (*6)
If you're interested in making a working library, please fork and contribute!, (*7)
| htfaker framework |
status
|
| get document root directory |
Testing |
| get current directory |
in dev |
| check if request is for a file |
in dev |
| check if request is for a directory |
in dev |
| get .htaccess files, current to root |
Testing |
| parse all found .htaccess files |
Testing |
| get all directives to apply |
in dev |
| apply directives |
in dev |
| shutdown |
- |
|
core directives |
status
|
| ErrorDocument |
in dev |
| ErrorDocument 400 (Bad Request) |
- |
| ErrorDocument 401 (Unauthorized) |
- |
| ErrorDocument 402 (Payment Required) |
- |
| ErrorDocument 403 (Forbidden) |
- |
| ErrorDocument 404 (Not Found) |
- |
| ErrorDocument 500 (Internal Server Error) |
- |
| ForceType |
- |
| Options |
in dev |
| Options -Indexes |
- |
| Options +Indexes |
- |
|
mod_access_compat directives |
status |
| Allow |
- |
| Allow from all |
- |
| Allow from host
|
- |
| Allow from host [host] ...
|
- |
| Allow from ip
|
- |
| Allow from ip [ip] ...
|
- |
| Allow from network/netmask
|
- |
| Allow from network/nnn-CIDR
|
- |
| Allow from env=
|
- |
| Deny |
- |
| Deny from all |
- |
| Deny from host
|
- |
| Deny from host [host] ...
|
- |
| Deny from ip
|
- |
| Deny from ip [ip] ...
|
- |
| Deny from network/netmask
|
- |
| Deny from network/CIDR
|
- |
| Deny from env=
|
- |
| Order |
- |
| Order Allow,Deny |
- |
| Order Deny,Allow |
- |
| Satisfy |
- |
| Satisfy All |
- |
| Satisfy Any |
- |
License
htfaker is dual licensed under
The MIT License or the
GNU General Public License, at your choosing., (*8)
Read the
LICENSE.md
file for more info., (*9)
TODO