Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
merged branch canni/prod_server (PR #7507)
This PR was squashed before being merged into the master branch (closes #7507). Discussion ---------- [FrameworkBundle] Enable possibility to run PHP bultin server in production env See the referenced ticket for discussion; | Q | A | ------------- | --- | Bug fix? | no | New feature? | yes | BC breaks? | no | Deprecations? | no | Tests pass? | yes | Fixed tickets | #7430 | License | MIT Commits ------- 12fce13 [FrameworkBundle] Enable possibility to run PHP bultin server in production env
- Loading branch information
Showing
4 changed files
with
38 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
30 changes: 30 additions & 0 deletions
30
src/Symfony/Bundle/FrameworkBundle/Resources/config/router_prod.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Original file line | Diff line number | Diff line change |
---|---|---|---|
@@ -0,0 +1,30 @@ | |||
<?php | |||
|
|||
/* | |||
* This file is part of the Symfony package. | |||
* | |||
* (c) Fabien Potencier <fabien@symfony.com> | |||
* | |||
* For the full copyright and license information, please view the LICENSE | |||
* file that was distributed with this source code. | |||
*/ | |||
|
|||
/* | |||
* This file implements rewrite rules for PHP built-in web server. | |||
* | |||
* See: http://www.php.net/manual/en/features.commandline.webserver.php | |||
* | |||
* If you have custom directory layout, then you have to write your own router | |||
* and pass it as a value to 'router' option of server:run command. | |||
* | |||
* @author: Michał Pipa <michal.pipa.xsolve@gmail.com> | |||
* @author: Albert Jessurum <ajessu@gmail.com> | |||
*/ | |||
|
|||
if (is_file($_SERVER['DOCUMENT_ROOT'].DIRECTORY_SEPARATOR.$_SERVER['SCRIPT_NAME'])) { | |||
return false; | |||
} | |||
|
|||
$_SERVER['SCRIPT_FILENAME'] = $_SERVER['DOCUMENT_ROOT'].DIRECTORY_SEPARATOR.'app.php'; | |||
|
|||
require 'app.php'; |