N
N
Nikita2014-10-30 01:22:47
Search Engine Optimization
Nikita, 2014-10-30 01:22:47

How to remove extra slashes from URL in Rails app on Heroku?

The bottom line is that if the user enters any of the addresses

http://domain.com/////
http://domain.com//////////////
http://domain.com//

redirected via 301 (or something else SEO-friendly)
to http://domain.com/
Need a solution for rack-rewrite or just via rails controllers or maybe via some configuration on Heroku/Webrick. I only ask you to write in detail and check whether it really works (there is no theoretical solution, I went through a lot of them and nothing has worked so far).

Answer the question

In order to leave comments, you need to log in

1 answer(s)
H
Heafy, 2014-11-20
@Heafy

I don’t know how to get rid of them, but I don’t see the point in suffering with these slashes.
Have you ever seen such a situation in the SERPs (I’m speaking as a SEO specialist now)?
A lot of slashes can be added to any site and nothing, search engines can handle it.
Unless they distort the metrics or their influence on the link weight to study .. But where do they come from in general.
In SEO, only the first slash, or its absence, matters. I have never seen duplicate pages because of the many slashes.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question