Quantcast
Channel: Active questions tagged amazon-ec2 - Stack Overflow
Viewing all articles
Browse latest Browse all 29248

Double slash in URL is automatically converted in single slash in $_SERVER['REQUEST_URI']

$
0
0

I am working on one site where I need to show 404 pages when someone adds double slash in URL.

I have written logic to check REQUEST_URI and if there is double slash then I am showing 404 pages...

But when I add double slash in URL it shows single slash in REQUEST_URI but in URL, it is double slash...

here I attached a screenshot for the same issue.

For Example: if i enter www.example.com//check -> then its is coming as /check in REQUEST_URI but i want it should come as //check

Site is hosted in AWS cloud load balancer (ELB). in local setting its working proeper but in production its creating issue.

Can someone help me how can I prevent this?

enter image description here


Viewing all articles
Browse latest Browse all 29248

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>