- Code: Select all
RewriteRule ^((?:Paired|Mobile)?Coupon|Raffle)/(\d+)/Image/?$ /product_image.php?type=$1&id=$2 [L,NC]
and the following code in /product_image.php
- Code: Select all
var_dump([
"REQUEST_URI" =>$_SERVER["REQUEST_URI"],
"QUERY_STRING" =>$_SERVER["QUERY_STRING"]
]);
When I request /Coupon/9/Image/ I get
- Code: Select all
array(2) {
["REQUEST_URI"] => string(16) "/Coupon/9/Image/"
["QUERY_STRING"] => string(16) "type=Coupon&id=9"
}
When I request /Raffle/2/Image/ I get
- Code: Select all
array(2) {
["REQUEST_URI"] => string(15) "/Raffle/2/Image/"
["QUERY_STRING"] => string(16) "type=raffle&id=2"
}
The raffle request query_string is always lowercase, While cases in the coupon request are mirrored in the query_string. How do I ensure the request case is preserved in the query_string?
My debugging before asking here:
- * Removing the [No Case] flag causes a 404 error for the raffle request (case independent); the coupon request only matches for 'Coupon' as expected.
* This is not an issue on my production server (standard LAMP install - No XAMPP)
XAMPP version
- 5.5.30
- Windows 10 x64
- S:\Production\Networking\xampp
- enabled mod_rewrite
I also set up Virtual hosts, but don't think it affects my issue.