Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 949423
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 15, 20262026-05-15T23:24:01+00:00 2026-05-15T23:24:01+00:00

I have developed a PHP script that uses $_REQUEST[] superglobal. A typical client request

  • 0

I have developed a PHP script that uses $_REQUEST[] superglobal. A typical client request might consist of:

http://host.name/socnet/add.php?shortid=1&author=NewUser2&comment=Dad%20dad%20dad

This URL is rewritten by Apache in my production environment to an equivalent https:// URL according to the following rewrite rule:

RewriteRule ^socnet/add.php(.*) https://%{SERVER_NAME}/socnet/add.php$1 [R,L]

Whilst developing with PHP 5.3.2 and debugging with NetBeans everything works as expected $_REQUEST['comment']="Dad dad dad"

However when I deployed to my VPS host environment running PHP 5.2.4 and which does the URL rewriting described above $_REQUEST['comment']="Dad%20dad%20dad"…

So it looks like $_REQUEST['comment'] is not url decoded as expected with 5.2.4 and my rewrite rule

Any ideas for why this is happening and a sensible workaround would be greatly appreciated. Is it a PHP version related issue or something more subtle? Interested to hear from anyone who has encountered this issue at the time of deployment before and how they solved it.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-15T23:24:02+00:00Added an answer on May 15, 2026 at 11:24 pm

    I suspect that mod_rewrite is encoding it, leading to it being encoded twice. I have not tried this, but instead of matching (.*), try changing the [R,L] to [R,L,QSA]. QSA stands for query-string-appended.

    EDIT

    The correct option found by landstatic himself is NE which stands for no escaping.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Ask A Question

Stats

  • Questions 511k
  • Answers 511k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team
    Editorial Team added an answer Totally untested, but you get the idea. struct stdio_stream {… May 16, 2026 at 5:11 pm
  • Editorial Team
    Editorial Team added an answer After some back and forth with DTS I managed to… May 16, 2026 at 5:11 pm
  • Editorial Team
    Editorial Team added an answer Add 'float: left' to the first, and remove 'clear: both'… May 16, 2026 at 5:11 pm

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

Related Questions

I have developed a recursive FTP-download script, in PHP5, that allows you to select
i have developed a php mysql website and now i want to access this
it looks like I'm facing a typical memory outage problem when using a PHP
I have this application authored in Flash CS4, and it uses ActionScript 2.0 due
We are a team of many developers working on a website that uses both
We are creating a php script project; which we will be selling to customers.
I have developed a wordpress theme with header, footer, sidebar, index, page, single and
There is an issue that I cannot solve, I've been looking a lot in
I am looking for a form class that: Is standalone/doesnt need a framework to
I'm building an API that will use JSON. The primary use for this API

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.