Skip to content

secure.php.net redirect omits slash to separate domain and path #1684

Closed

Description

@cngJo

Affected Page URL

https://secure.php.net/

Describe the bug

The redirect that redirects secure.php.net to php.net removes any "/" after php.net which breaks all redirects that include paths on secure.php.net.
This happens e.g. for the "!php" bank for DuckDuckGo, which seem to use "https://secure.php.net/manual-lookup.php?pattern={{{s}}}" under the hood.

Steps to reproduce

  1. curl -v --head https://secure.php.net/manual-lookup.php?pattern=explode
  2. Check "Location" header
  3. -> https://www.php.netmanual-lookup.php?pattern=explode (missing a / after php.net)

Expected behavior

The returned location header in the redirect response should keep the "/", in the above example, that would be https://www.php.net/manual-lookup.php?pattern=explode

Screenshots

Seemingly the bang "!php" configuration for DuckDuckGo
Image

(partial) curl response from my local machine for curl -v --head https://secure.php.net/manual-lookup.php?pattern=explode

Image

Additional context

I'm not sure if this is the right place to report this, if not, please "redirect" me to the proper place :)

Right after the creation of this issue, I'll fill out the above form on DuckDuckGo to ask them to change the bang source to https://www.php.net/manual-lookup.php?pattern={{{s}}} referencing this issue, since this is where the secure.php.net redirect wants to redirect me to.

Activity

  1. cngJo commented on Dec 4, 2025

    @cngJo
    Author

    For transparency, full message I sent to DDG on https://duckduckgo.com/newbang

    Image

    (email hidden on purpose)

  2. changed the title [-]secure.php.net redirect is broken[/-] [+]secure.php.net redirect omits slash to separate domain and path[/+] on Dec 4, 2025
  3. derickr commented on Dec 8, 2025

    @derickr
    Member

    I'll fix this on the CDN side, but it would be great if DDG would stop using "secure.php.net". Would you be able to convince them to do that?

  4. derickr commented on Dec 8, 2025

    @derickr
    Member

    It's now fixed on the PHP side.

  5. cngJo commented on Dec 8, 2025

    @cngJo
    Author

    Awesome! Thank you, @derickr 🎉

    I've written to DDG to point the !php bang directly to www.php.net and linked them to this ticket, but didn't get any response from them till now. When I get something, I'll make sure to post the response in this ticket.

  6. added 2 commits that reference this issue on Dec 8, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions