Bug #66191 [Opn->Nab]: relative paths are not handled correctly
| From: | johannes@php.net | Date: | Thu, 28 Nov 2013 15:40:23 +0000 |
| Subject: | Bug #66191 [Opn->Nab]: relative paths are not handled correctly | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-182989@lists.php.net to get a copy of this message | ||
Edit report at https://bugs.php.net/bug.php?id=66191&edit=1
ID: 66191
Updated by: johannes@php.net
Reported by: jakoch at web dot de
Summary: relative paths are not handled correctly
-Status: Open
+Status: Not a bug
Type: Bug
Package: Built-in web server
Operating System: Windows
PHP Version: 5.4.22
Block user comment: N
Private report: N
New Comment:
These paths have to be resolved b the browser, not PHP as server. Browsers interpret relative URLs
relative to the current URL ...
Previous Comments:
------------------------------------------------------------------------
[2013-11-28 15:22:53] jakoch at web dot de
Description:
------------
I believe that relative paths are not handled correctly by the embedded server.
I have this in my index.html file:
<link href="assets/css/bootstrap.css" rel="stylesheet">
The file resides in /www/application.
Served by php -S localhost:90 -t c:\www.
When i browse http://localhost:90/application the css
is not loaded.
The URL is not resolved to http://localhost:90/application/assets/css/bootstrap.css,
but http://localhost:90/assets/css/bootstrap.css.
Resulting in a resource not found error.
The domain/URI of the current document is not taken into account.
http://www.w3.org/TR/html401/struct/links.html
12.4.1 Resolving relative URIs
3)"By default, the base URI is that of the current document.
The base URI is not the the root of the server.
Screenshot: http://i.imgur.com/1KDW42G.jpg
------------------------------------------------------------------------
--
Edit this bug report at https://bugs.php.net/bug.php?id=66191&edit=1