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?