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:12
Avg. Score:4.6 ± 0.8
Reproduced:12 of 12 (100.0%)
Same Version:5 (41.7%)
Same OS:9 (75.0%)
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 Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
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

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sat Nov 23 09:01:28 2024 UTC