logo
Apache Lounge
Webmasters

 

About Forum Index Downloads Search Register Log in RSS X


Keep Server Online

If you find the Apache Lounge, the downloads and overall help useful, please express your satisfaction with a donation.

or

Bitcoin

A donation makes a contribution towards the costs, the time and effort that's going in this site and building.

Thank You! Steffen

Your donations will help to keep this site alive and well, and continuing building binaries. Apache Lounge is not sponsored.
Post new topic   Forum Index -> Apache View previous topic :: View next topic
Reply to topic   Topic: REDIRECT_URL is garbled
Author
spser



Joined: 29 Aug 2016
Posts: 97

PostPosted: Mon 14 Mar '22 15:28    Post subject: REDIRECT_URL is garbled Reply with quote

Code:

    [REMOTE_PORT] => 14605
    [REDIRECT_URL] => /house/kw����1��/
    [GATEWAY_INTERFACE] => CGI/1.1
    [SERVER_PROTOCOL] => HTTP/2.0
    [REQUEST_METHOD] => GET
    [QUERY_STRING] =>
    [REQUEST_URI] => /house/kw%B3%C7%CA%D01%BA%C5/
    [SCRIPT_NAME] => /index.php
    [PHP_SELF] => /index.php
    [SERVER_SOFTWARE] => Apache/2.4.52 (Win64)

mod_fcgid/2.3.9 OpenSSL/1.1.1m PHP/8.1.3 SVN/1.14.1
---------------------------
Code:

RewriteRule ^(.*)$ index.php [QSA,NC,L]


This is a very simple pseudo static that can be accessed when accessing the specified url.
REDIRECT_URL is garbled, please advise.
Back to top
James Blond
Moderator


Joined: 19 Jan 2006
Posts: 7373
Location: Germany, Next to Hamburg

PostPosted: Mon 14 Mar '22 15:42    Post subject: Reply with quote

� is the correct ASCII value for %B3. Yes, it should be ³.

Is the page you are created returned as UTF-8?
Back to top
spser



Joined: 29 Aug 2016
Posts: 97

PostPosted: Mon 14 Mar '22 16:37    Post subject: Reply with quote

index.php confirms it is utf-8 encoded
Back to top
spser



Joined: 29 Aug 2016
Posts: 97

PostPosted: Sun 20 Mar '22 17:12    Post subject: Reply with quote

help me
Back to top
tangent
Moderator


Joined: 16 Aug 2020
Posts: 348
Location: UK

PostPosted: Mon 21 Mar '22 19:17    Post subject: Reply with quote

Your RewriteRule flags are missing the NE (no escape) option, which shows in your PHP [REQUEST_URI] being hex coded.

I'm not that familiar with PHP configuration, but it looks like each %xx is then being further encoded in the {REDIRECT_URL].

So what happens if you add the NE flag to the Apache configuration?
Back to top


Reply to topic   Topic: REDIRECT_URL is garbled View previous topic :: View next topic
Post new topic   Forum Index -> Apache