A
A
abrakadabra7772021-04-23 11:17:32
Drupal
abrakadabra777, 2021-04-23 11:17:32

Drupal - how to remove duplicates /////?

There is a site on Drupal 7
if you enter any number of slashes after the site address // , it does not open 404, but the same main page is simply loaded.
How to eliminate such a cant?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
Z
Zettabyte, 2021-04-23
@Zettabyte

I believe this is normal behavior:
https://qna.habr.com/////
https://www.google.com/////
https://xn----7sbbfbnfa0a2audfacc2cat8e9f.xn- -p1ai/////
At least it works in Firefox.
I can hardly imagine who will specifically deal with entering slashes at the end of the URL, why this is a jamb, and it must be fixed by all means, but I see the following options:

  • Use the Redirect module ;
  • At least in Drupal 8 it has a "Remove trailing slashes from paths" setting, I won't say about 7;
  • Specify
    <link rel="canonical" href="https://VashSite.ru/" />
    in the main page section of <head>your site (or better, set this for all pages, with their corresponding URLs, of course).

A
Alexander Leleka, 2021-06-01
@Laweb

There is a good Global redirect module
. It seems to solve this problem.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question