Skip to content

Instantly share code, notes, and snippets.

@yukikaoru
Created October 30, 2012 09:31
Show Gist options
  • Save yukikaoru/3979239 to your computer and use it in GitHub Desktop.
Save yukikaoru/3979239 to your computer and use it in GitHub Desktop.
PHP built-in web server's routing settings for Symfony2
<?php
/**
* This script set in your project's web/ directory.
* Then, you boot built-in web server as below.
*
* php -S 0.0.0.0:50000 -t /path/to/web/ /path/to/web/router.php
*/
if (preg_match('/^(app|app_dev|config)\.php|\.(js|css|html|gif|png|jpg)$/', $_SERVER['REQUEST_URI'])) {
return false;
} else {
require 'app_dev.php';
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment