PHPackages                             attogram/htfaker - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. attogram/htfaker

AbandonedLibrary[Utility &amp; Helpers](/categories/utility)

attogram/htfaker
================

.htaccess functionality for the PHP built-in web server

v0.0.3(6y ago)129(MIT or GPL-3.0+)PHPPHP &gt;=5.4.0 || ^7.0CI failing

Since Jul 26Pushed 6y agoCompare

[ Source](https://github.com/attogram/htfaker)[ Packagist](https://packagist.org/packages/attogram/htfaker)[ Docs](https://github.com/attogram/htfaker)[ RSS](/packages/attogram-htfaker/feed)WikiDiscussions master Synced yesterday

READMEChangelog (3)Dependencies (3)Versions (4)Used By (0)

htfaker
=======

[](#htfaker)

[![Latest Stable Version](https://camo.githubusercontent.com/d3abd99956919b01df4e3c6c9426fa11ea8e0fa5cebaec60d6effedafe8e5966/68747470733a2f2f706f7365722e707567782e6f72672f6174746f6772616d2f687466616b65722f762f737461626c65)](https://packagist.org/packages/attogram/htfaker)[![Latest Unstable Version](https://camo.githubusercontent.com/a7ba98bde80d85471938c5563d60b5cc44e7f62bae1afa60ba5707e2d335a3d4/68747470733a2f2f706f7365722e707567782e6f72672f6174746f6772616d2f687466616b65722f762f756e737461626c65)](https://packagist.org/packages/attogram/htfaker)[![Total Downloads](https://camo.githubusercontent.com/e46025dd85e338cbe1a1f940ff51885a90d6a215d504f594e77a9fc76e24aae4/68747470733a2f2f706f7365722e707567782e6f72672f6174746f6772616d2f687466616b65722f646f776e6c6f616473)](https://packagist.org/packages/attogram/htfaker)[![License](https://camo.githubusercontent.com/df2181c186e4efa709c568e52706af17828ea266d1888189ae1d276cc9524253/68747470733a2f2f706f7365722e707567782e6f72672f6174746f6772616d2f687466616b65722f6c6963656e7365)](https://github.com/attogram/htfaker/blob/master/LICENSE.md)[![Code Climate](https://camo.githubusercontent.com/aa958ccdadb6fc600c000658ac3e577196356a9eb0b4b64a72af430be6d4c6fd/68747470733a2f2f636f6465636c696d6174652e636f6d2f6769746875622f6174746f6772616d2f687466616b65722f6261646765732f6770612e737667)](https://codeclimate.com/github/attogram/htfaker)[![Codacy Badge](https://camo.githubusercontent.com/bf3b62d504b3936cab700412366d2d58f969396519dd120ee8c3b71234e869b1/68747470733a2f2f6170692e636f646163792e636f6d2f70726f6a6563742f62616467652f47726164652f3739383538373638336361353436363161386662356466356564383530373435)](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
-------

[](#install)

Example install:

```
composer require attogram/htfaker

```

Usage
-----

[](#usage)

Example usage:

```
cd vendor/attogram/htfaker
php -S localhost:8080 router.php

```

then open  in your web browser.

Status
------

[](#status)

htfaker is in the startup stage.

If you're interested in making a working library, please fork and contribute!

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](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
-------

[](#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
----

[](#todo)

- use ? - Apache License
- use ?
- use ?

###  Health Score

24

—

LowBetter than 31% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity9

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity50

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~649 days

Total

3

Last Release

2328d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/6d9bd73aa2ddae66abc8ba1f32e093fc66e7b7b7fa4f35d6b0ec087cdd341fa3?d=identicon)[attogram](/maintainers/attogram)

---

Top Contributors

[![attogram](https://avatars.githubusercontent.com/u/8653063?v=4)](https://github.com/attogram "attogram (62 commits)")

---

Tags

htaccessphp-builtin-serverhtaccesshtfaker

### Embed Badge

![Health badge](/badges/attogram-htfaker/health.svg)

```
[![Health](https://phpackages.com/badges/attogram-htfaker/health.svg)](https://phpackages.com/packages/attogram-htfaker)
```

###  Alternatives

[laravel/framework

The Laravel Framework.

34.8k543.8M19.6k](/packages/laravel-framework)[flow-php/flow

PHP ETL - Extract Transform Load - Data processing framework

85036.3k](/packages/flow-php-flow)[pimcore/pimcore

Content &amp; Product Management Framework (CMS/PIM/E-Commerce)

3.8k3.8M497](/packages/pimcore-pimcore)[shopware/platform

The Shopware e-commerce core

3.4k1.5M3](/packages/shopware-platform)[shopware/core

Shopware platform is the core for all Shopware ecommerce products.

585.6M551](/packages/shopware-core)[spatie/laravel-export

Create a static site bundle from a Laravel app

674146.0k6](/packages/spatie-laravel-export)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
