Bug #74570 [NEW]: Not Found in JS, CSS and IMG files

From: Date: Wed, 10 May 2017 20:05:51 +0000
Subject: Bug #74570 [NEW]: Not Found in JS, CSS and IMG files
Groups: php.bugs 
Request: Send a blank email to php-bugs+get-209048@lists.php.net to get a copy of this message
From: mariombn at gmail dot com Operating system: Windows 7 PHP version: 7.1.4 Package: Built-in web server Bug Type: Bug Bug description:Not Found in JS, CSS and IMG files Description: ------------ --- From manual page: http://www.php.net/features.commandline.webserver --- Create a router.php file in the public root of my project that is meant to be an alternative to my .htaccess file when using the built-in PHP web server. Even using example # 3 of the documentation, none of the exception files such as .png, .jpg or others that I have added as .js and .css are not loaded. If I call them directly through the browser, the Not Found error is displayed, The requested resource /assets/css/bootstrap.min.css was not found on this server. Test script: --------------- <?php if (preg_match('/\.(?:png|jpg|jpeg|gif|css|js)$/', $_SERVER["REQUEST_URI"])) { return false; // serve the requested resource as-is. } else { include "public/index.php"; } ?> Before, use comando: $php -S 127.0.0.1 public/route.php Expected result: ---------------- My CSS and JavaScript uploaded successfully Actual result: -------------- Not Found The requested resource /assets/css/bootstrap.min.css was not found on this server. -- Edit bug report at https://bugs.php.net/bug.php?id=74570&edit=1 -- Try a snapshot (PHP 5.4): https://bugs.php.net/fix.php?id=74570&r=trysnapshot54 Try a snapshot (PHP 5.5): https://bugs.php.net/fix.php?id=74570&r=trysnapshot55 Try a snapshot (trunk): https://bugs.php.net/fix.php?id=74570&r=trysnapshottrunk Fixed in SVN: https://bugs.php.net/fix.php?id=74570&r=fixed Fixed in release: https://bugs.php.net/fix.php?id=74570&r=alreadyfixed Need backtrace: https://bugs.php.net/fix.php?id=74570&r=needtrace Need Reproduce Script: https://bugs.php.net/fix.php?id=74570&r=needscript Try newer version: https://bugs.php.net/fix.php?id=74570&r=oldversion Not developer issue: https://bugs.php.net/fix.php?id=74570&r=support Expected behavior: https://bugs.php.net/fix.php?id=74570&r=notwrong Not enough info: https://bugs.php.net/fix.php?id=74570&r=notenoughinfo Submitted twice: https://bugs.php.net/fix.php?id=74570&r=submittedtwice register_globals: https://bugs.php.net/fix.php?id=74570&r=globals PHP 4 support discontinued: https://bugs.php.net/fix.php?id=74570&r=php4 Daylight Savings: https://bugs.php.net/fix.php?id=74570&r=dst IIS Stability: https://bugs.php.net/fix.php?id=74570&r=isapi Install GNU Sed: https://bugs.php.net/fix.php?id=74570&r=gnused Floating point limitations: https://bugs.php.net/fix.php?id=74570&r=float No Zend Extensions: https://bugs.php.net/fix.php?id=74570&r=nozend MySQL Configuration Error: https://bugs.php.net/fix.php?id=74570&r=mysqlcfg

« previous php.bugs (#209048) next »