Skip to content

Instantly share code, notes, and snippets.

Adam Englander aenglander

Block or report user

Report or block aenglander

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View keybase.md

Keybase proof

I hereby claim:

  • I am aenglander on github.
  • I am aenglander (https://keybase.io/aenglander) on keybase.
  • I have a public key ASCvvDhvWcJI1BxKtIGTn6qlS2qceFP4Z7_7MGHGNUkz_go

To claim this, I am signing this object:

@aenglander
aenglander / htaccess_router.php
Created Apr 2, 2015
PHP .htaccess router for built in web server
View htaccess_router.php
<?php
if (file_exists($_SERVER['SCRIPT_FILENAME'])) {
return false;
}
$_SERVER['DOCUMENT_ROOT'] = empty($_SERVER['DOCUMENT_ROOT']) ? $_SERVER['PWD'] . '/www' : $_SERVER['DOCUMENT_ROOT'];
$htaccess = $_SERVER['DOCUMENT_ROOT'] . '/.htaccess';
$rewrites = array();
if (file_exists($htaccess)) {
$fp = fopen($htaccess, "r");
You can’t perform that action at this time.