php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Request #67027 Issue a "trailing slash" redirect
Submitted: 2014-04-05 11:31 UTC Modified: -
Votes:9
Avg. Score:4.8 ± 0.6
Reproduced:9 of 9 (100.0%)
Same Version:4 (44.4%)
Same OS:7 (77.8%)
From: cmbecker69 at gmx dot de Assigned:
Status: Open Package: Built-in web server
PHP Version: 5.5.11 OS: any
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: cmbecker69 at gmx dot de
New email:
PHP Version: OS:

 

 [2014-04-05 11:31 UTC] cmbecker69 at gmx dot de
Description:
------------
When the server receives a request for a URI that points to a
directory, it should issue a redirect with a trailing slash
appended, so that relative URIs in the delivered document work as
expected.

As it is now, when one requests http://localhost/foo, and there
is a file foo/index.html with a <link href="./styles.css">, the
stylesheet is requested as http://localhost/foo./styles.css
instead of http://localhost/foo/styles.css.

This issue was reported in #66191 as a bug, but the ticket was
closed before later comments revealed the actual cause of the
problem. I'm not sure if the current behavior can be regarded as
a bug, but it would be nice, if it will be solved by the built-in
webserver without requiring a custom router script.


Patches

Add a Patch

Pull Requests

Add a Pull Request

 
PHP Copyright © 2001-2018 The PHP Group
All rights reserved.
Last updated: Mon Dec 17 09:01:25 2018 UTC