humanmade / hm-redirects

Fast and scalable redirects plugin for WordPress
29 stars 11 forks source link

Some URLs that should match don't due to different stored hashes #44

Closed igmoweb closed 2 years ago

igmoweb commented 3 years ago

These URLs:

Are essentially the same URL. However, hm-redirects don't take the trailing slash into account. When parsing the URL, I think that the plugin should normalize the URLs before storing them into database and generate their hashes.

It also happens if the lead slash is not present in the relative path when a new redirect is created. It also needs to be normalized in some way.

Note that if a URL contains a slash in any of its query args, this normalization should not affect those args.

roborourke commented 2 years ago

Duplicate of #34