Skip to content

Add redirect.xml map for manual pages on php.net#5658

Open
jordikroon wants to merge 6 commits into
php:masterfrom
jordikroon:redirects-xml
Open

Add redirect.xml map for manual pages on php.net#5658
jordikroon wants to merge 6 commits into
php:masterfrom
jordikroon:redirects-xml

Conversation

@jordikroon

@jordikroon jordikroon commented Jul 6, 2026

Copy link
Copy Markdown
Member

The goal for this PR is to migrate all doc related redirects out of web-php.
Instead we generate a redirects.json from redirects.xml which is then loaded in-place.

Redirects not related to docs are NOT migrated. However shortcuts are.

Depends on:

php/phd#260

Comment thread redirects.xml
Rendered to redirects.php by phd and included by web-php/error.php.
Only redirects that concern manual pages live here;

Every redirect here is served with HTTP 301.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Right now, not all of these do a 301 redirect, but instead serve the content directly with the "legacy" URL. I think for many, that is the right goal. (As example https://www.php.net/class.oci-lob)

For others, such as https://www.php.net/@, there is a 301.

@alfsb

alfsb commented Jul 7, 2026

Copy link
Copy Markdown
Member

The question in another PR, about the phd/Redirects class only doing validations, is in the context that I would not oppose having a .json file in doc-en, already in the final format that web-php/error.php uses. Something like:

[{"comment": "See web-php/error.php for details."}

,{"comment": "   OCI-Collection class renamed   "}
,{"redirect":"manual", "from":"class.oci-lob", "to":"class.ocilob"}
,{"redirect":"manual", "from":"oci-lob.append", "to":"ocilob.append"}

]

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants