3

The problem url links to my website are of the form

/fullpage.php%3F%20cp3_Hex%3D0F0200%26cp2_Hex%3D000000%26cp1_Hex%3DFC2024

The un-encoded url is

/fullpadge.php?cp3_Hex=0F0200&cp2_Hex=000000&cp1_Hex=FC2024

Apache returns a:

403: You don't have permission to access /fullpage.php? cp3_Hex=0F0200&cp2_Hex=000000

I have tried the following rewrite rule

RewriteRule ^/fullpage.php%3F(.*)$ /fullpage.php?$1

to no avail

Any ideas

LU RD
  • 34,438
  • 5
  • 88
  • 296
Paul Salber
  • 700
  • 6
  • 12

1 Answers1

-3

You are almost certainly getting a 403 error. The error is caused because ? is a banned file/directory name character on Windows and Linux. This means when Apache attempts to find a file or directory named "/document/root/index.php?blah" (after decoding) and it causes a 403 error. This is before the .htaccess files are read so you cannot use mod_rewrite in the .htaccess file to override this 403 error or an ErrorDocument defined in the .htaccess file to catch this error.

The only way to catch %3f is to use mod_rewrite or an ErrorDocument in a "VirtualHost" e.g. in httpd-vhosts.conf (or the main server configuration if there aren't any "Virtualhost"s e.g. in httpd.conf).

Ingo
  • 5,239
  • 1
  • 30
  • 24