Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
BedrockMission!

Learn More

View all

Sign in to view all badges

Getting source of the page with double slash(//) at the end of the URL.

Avatar

Avatar
Validate 1
MVP
Umesh_Thakur
MVP

Likes

147 likes

Total Posts

157 posts

Correct Reply

53 solutions
Top badges earned
Validate 1
Applaud 25
Ignite 3
Ignite 1
Give Back 5
View profile

Avatar
Validate 1
MVP
Umesh_Thakur
MVP

Likes

147 likes

Total Posts

157 posts

Correct Reply

53 solutions
Top badges earned
Validate 1
Applaud 25
Ignite 3
Ignite 1
Give Back 5
View profile
Umesh_Thakur
MVP

26-03-2021

Dear Members,

I am facing one unique kind of issue with "//" at the end of the url.

When I hit https://dev-demo.edev.mysite.com:8080/personalcare/shop/shampoo/ it works perfectly fine but when I hit the sam url with double slash at the end https://dev-demo.edev.mysite.com:8080/personalcare/shop/shampoo// it gives source of webpage.

When I check the same it browser's Network tab it simply try to call "/" as document as in below image

Umesh_Thakur_0-1616751314529.png

then I try to further analyse the dispatcher log I see with correct url it was looking for regular path in cache but with wrong url(with double slash) it try to look some thing strange to me like

/content/mysite/www/us/en_us/personalcare/shop/shampoo.fold.html/.html

 

we already have remove slash rule on the dispatcher and it is working fine in some environment.

 

I am not able to find the root cause of it. if any one can please share some insight on it.

Thanks

Umesh Thakur

 

Accepted Solutions (1)

Accepted Solutions (1)

Avatar

Avatar
Coach
MVP
Arun_Patidar
MVP

Likes

1,345 likes

Total Posts

3,220 posts

Correct Reply

914 solutions
Top badges earned
Coach
Contributor 2
Ignite 10
Give Back 700
Boost 1000
View profile

Avatar
Coach
MVP
Arun_Patidar
MVP

Likes

1,345 likes

Total Posts

3,220 posts

Correct Reply

914 solutions
Top badges earned
Coach
Contributor 2
Ignite 10
Give Back 700
Boost 1000
View profile
Arun_Patidar
MVP

28-03-2021

HI Umesh,

The root cause could be reverse mapping, which is adding .html after end /

You should check the reverse mapping rule as well.

Answers (2)

Answers (2)

Avatar

Avatar
Validate 25
MVP
Singaiah_Chintalapudi
MVP

Likes

131 likes

Total Posts

234 posts

Correct Reply

39 solutions
Top badges earned
Validate 25
Validate 10
Validate 1
Ignite 5
Ignite 3
View profile

Avatar
Validate 25
MVP
Singaiah_Chintalapudi
MVP

Likes

131 likes

Total Posts

234 posts

Correct Reply

39 solutions
Top badges earned
Validate 25
Validate 10
Validate 1
Ignite 5
Ignite 3
View profile
Singaiah_Chintalapudi
MVP

29-03-2021

You should be redirecting these requests (ending with //) to 404 page at the apache/dispatcher level. Any specific requirement that you want to allow these pages?

Avatar

Avatar
Give Back 100
Level 10
asutosh_jena
Level 10

Likes

544 likes

Total Posts

663 posts

Correct Reply

190 solutions
Top badges earned
Give Back 100
Boost 500
Affirm 100
Ignite 1
Establish
View profile

Avatar
Give Back 100
Level 10
asutosh_jena
Level 10

Likes

544 likes

Total Posts

663 posts

Correct Reply

190 solutions
Top badges earned
Give Back 100
Boost 500
Affirm 100
Ignite 1
Establish
View profile
asutosh_jena
Level 10

26-03-2021

Hi @Umesh_Thakur 

I see the request URL has "fold" as the selector but not sure where it is coming from.

Can you please try with the below rule and see if it resolves the issue.

 

RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)/+$ $1 [R=301,L]

Thanks!