https://github.com/attogram/htfaker
.htaccess functionality with the PHP built-in web server
https://github.com/attogram/htfaker
htaccess php-builtin-server
Last synced: 3 months ago
JSON representation
.htaccess functionality with the PHP built-in web server
- Host: GitHub
- URL: https://github.com/attogram/htfaker
- Owner: attogram
- License: other
- Created: 2016-07-25T09:09:59.000Z (almost 9 years ago)
- Default Branch: master
- Last Pushed: 2020-03-31T09:11:01.000Z (about 5 years ago)
- Last Synced: 2025-01-16T18:02:47.382Z (4 months ago)
- Topics: htaccess, php-builtin-server
- Language: PHP
- Homepage:
- Size: 62.5 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE.md
Awesome Lists containing this project
README
# htfaker
[](https://packagist.org/packages/attogram/htfaker)
[](https://packagist.org/packages/attogram/htfaker)
[](https://packagist.org/packages/attogram/htfaker)
[](https://github.com/attogram/htfaker/blob/master/LICENSE.md)
[](https://codeclimate.com/github/attogram/htfaker)
[](https://www.codacy.com/app/attogram-project/htfaker?utm_source=github.com&utm_medium=referral&utm_content=attogram/htfaker&utm_campaign=Badge_Grade)
[`[CHANGELOG]`](https://github.com/attogram/htfaker/blob/master/CHANGELOG.md)[htfaker](https://github.com/attogram/htfaker) is a router script that emulates
[Apache .htaccess](https://httpd.apache.org/docs/current/howto/htaccess.html)
functionality for the
[PHP built-in web server](http://php.net/manual/en/features.commandline.webserver.php).## Install
Example install:
```
composer require attogram/htfaker
```## Usage
Example usage:
```
cd vendor/attogram/htfaker
php -S localhost:8080 router.php
```then open [http://localhost:8080/](http://localhost:8080/) in your web browser.
## Status
htfaker is in the startup stage.
If you're interested in making a working library, please fork and contribute!
[core](http://httpd.apache.org/docs/trunk/mod/core.html#allowoverride) directives | *status*
-------------------- | --------------------
[ErrorDocument](http://httpd.apache.org/docs/trunk/mod/core.html#errordocument) | [*in dev*](https://github.com/attogram/htfaker/blob/master/src/ErrorDocument.php)
ErrorDocument 400 (Bad Request) | -
ErrorDocument 401 (Unauthorized) | -
ErrorDocument 402 (Payment Required) | -
ErrorDocument 403 (Forbidden) | -
ErrorDocument 404 (Not Found) | -
ErrorDocument 500 (Internal Server Error) | -
[ForceType](http://httpd.apache.org/docs/trunk/mod/core.html#forcetype) | -
[Options](http://httpd.apache.org/docs/trunk/mod/core.html#options) | [*in dev*](https://github.com/attogram/htfaker/blob/master/src/Options.php)
Options -Indexes | -
Options +Indexes | -[mod_access_compat](http://httpd.apache.org/docs/trunk/mod/mod_access_compat.html) directives | *status*
-------------------- | --------------------
[Allow](http://httpd.apache.org/docs/trunk/mod/mod_access_compat.html#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](http://httpd.apache.org/docs/trunk/mod/mod_access_compat.html#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](http://httpd.apache.org/docs/trunk/mod/mod_access_compat.html#order) | -
Order Allow,Deny | -
Order Deny,Allow | -
[Satisfy](http://httpd.apache.org/docs/trunk/mod/mod_access_compat.html#satisfy) | -
Satisfy All | -
Satisfy Any | -[mod_alias](http://httpd.apache.org/docs/trunk/mod/mod_alias.html) directives | *status*
-------------------- | --------------------
[Redirect](http://httpd.apache.org/docs/trunk/mod/mod_alias.html#redirect) | -
[RedirectPermanent](http://httpd.apache.org/docs/trunk/mod/mod_alias.html#redirectpermanent) | -
[RedirectTemp](http://httpd.apache.org/docs/trunk/mod/mod_alias.html#redirecttemp) | -
[RedirectMatch](http://httpd.apache.org/docs/trunk/mod/mod_alias.html#redirectmatch) | -[mod_dir](http://httpd.apache.org/docs/trunk/mod/mod_dir.html) directives | *status*
-------------------- | --------------------
[DirectoryCheckHandler](https://httpd.apache.org/docs/trunk/mod/mod_dir.html#directorycheckhandler) | -
[DirectoryIndex](https://httpd.apache.org/docs/trunk/mod/mod_dir.html#directoryindex) | [*in dev*](https://github.com/attogram/htfaker/blob/master/src/DirectoryIndex.php)
DirectoryIndex _local-url_ | -
DirectoryIndex _local-url [local-url]..._ | -
DirectoryIndex disabled | -
[DirectoryIndexRedirect](https://httpd.apache.org/docs/trunk/mod/mod_dir.html#directoryindexredirect) | -
[DirectorySlash](https://httpd.apache.org/docs/trunk/mod/mod_dir.html#directoryslash) | -
[FallbackResource](https://httpd.apache.org/docs/trunk/mod/mod_dir.html#fallbackresource) | [*in dev*](https://github.com/attogram/htfaker/blob/master/src/FallbackResource.php)
FallbackResource _local-url_ | -
FallbackResource disabled | -[mod_rewrite](http://httpd.apache.org/docs/trunk/mod/mod_rewrite.html) directives | *status*
-------------------- | --------------------
[RewriteEngine](http://httpd.apache.org/docs/trunk/mod/mod_rewrite.html#rewriteengine) | -
[RewriteOptions](http://httpd.apache.org/docs/trunk/mod/mod_rewrite.html#rewriteoptions) | -
[RewriteBase](http://httpd.apache.org/docs/trunk/mod/mod_rewrite.html#rewritebase) | -
[RewriteCond](http://httpd.apache.org/docs/trunk/mod/mod_rewrite.html#rewritecond) | -
[RewriteRule](http://httpd.apache.org/docs/trunk/mod/mod_rewrite.html#rewriterule) | -[mod_authn_core](http://httpd.apache.org/docs/trunk/mod/mod_authn_core.html) directives | *status*
-------------------- | --------------------
[Require](http://httpd.apache.org/docs/trunk/mod/mod_authz_core.html#require) | -
[AuthType](http://httpd.apache.org/docs/trunk/mod/mod_authn_core.html#authtype) | -
[AuthName](http://httpd.apache.org/docs/trunk/mod/mod_authn_core.html#authname) | -[mod_authn_file](http://httpd.apache.org/docs/trunk/mod/mod_authn_file.html) directives | *status*
-------------------- | --------------------
[AuthUserFile](http://httpd.apache.org/docs/trunk/mod/mod_authn_file.html#authuserfile) | -[mod_authz_groupfile](http://httpd.apache.org/docs/trunk/mod/mod_authz_groupfile.html) directives | *status*
-------------------- | --------------------
[AuthGroupFile](http://httpd.apache.org/docs/trunk/mod/mod_authz_groupfile.html#authgroupfile) | -## License
htfaker is dual licensed under
[The MIT License](http://opensource.org/licenses/MIT) or the
[GNU General Public License](http://opensource.org/licenses/GPL-3.0), at your choosing.Read the
[LICENSE.md](https://github.com/attogram/htfaker/blob/master/LICENSE.md)
file for more info.## TODO
* use ? - Apache License
* use ?
* use ?