How to resolve "bad encoding" redirection warning

For technical support for all editions of CSS HTML Validator. Includes bug reports.
Post Reply
TomHTML
Rank III - Intermediate
Rank III - Intermediate
Posts: 60
Joined: Sun Feb 04, 2018 10:19 am

How to resolve "bad encoding" redirection warning

Post by TomHTML »

One of my URLs/folders redirects to its parent directory. I send these headers:

Code: Select all

header("HTTP/1.1 301 Moved Permanently"); 
header("Location: ../");
The validator reports "200 (redirected)" but also states:
1 redirection to: "../" (301 - 'Moved Permanently' redirect). WARNING: Redirected to one or more locations with bad encoding (like an unencoded space character).
I'm not clear on how to encode the Location header to satisfy the Validator. What should be changed?
User avatar
Albert Wiersch
Site Admin
Site Admin
Posts: 3644
Joined: Sat Dec 11, 2004 9:23 am
Location: Near Dallas, TX
Contact:

Re: How to resolve "bad encoding" redirection warning

Post by Albert Wiersch »

Thank you for the report... I may not be able to look into this until next week though, due to the US Thanksgiving holiday.
User avatar
Albert Wiersch
Site Admin
Site Admin
Posts: 3644
Joined: Sat Dec 11, 2004 9:23 am
Location: Near Dallas, TX
Contact:

Re: How to resolve "bad encoding" redirection warning

Post by Albert Wiersch »

UPDATE: Thank you for the report. This has been fixed for 2022/v22, expected to be released in January 2022.
Post Reply