WPCOM-Legacy-Redirector icon indicating copy to clipboard operation
WPCOM-Legacy-Redirector copied to clipboard

Consistency in Redirect To column

Open davidsword opened this issue 6 years ago • 4 comments
trafficstars

For internal links, wether a TO value shows as relative or as an absolute URLs, I believe serve no purpose. Users reading down the TO column might benefit from seeing consistent local relative paths or absolute urls, but probably not both.

screen shot 2018-12-06 at 3 23 20 pm

davidsword avatar Dec 06 '18 23:12 davidsword

The reason it shows both is because usually the full paths are for external URLs and the relative paths are for internal ones. Should we always show absolute URLS or only for external redirects?

mikeyarce avatar Dec 07 '18 16:12 mikeyarce

Currently a user, on site example.com, can submit an internal TO value of /my-destination/ or https://example.com/my-destination/

These would show up in the 'Redirect To' column exactly as entered, despite both being internal links. So if the rule is:

the relative paths are for internal ones

Then the https://example.com/ should be stripped out on the values to make it more obvious it's an internal redirect.

davidsword avatar Dec 07 '18 18:12 davidsword

This should also allow for a relative path of /foo, when the home / siteurl URL is example.com/bar, as is possible in a multisite subdirectory setup (full URL would be example.com/bar/foo).

GaryJones avatar May 26 '19 06:05 GaryJones

There are several options here for the destination:

  • An internal relative URL e.g. /foo.
  • An internal absolute URL e.g. https://example.com/subsite1/foo
  • An internal post ID (that may match the foo post) e.g. 5
  • An external absolute URL e.g. https://google.com, https://example.com/subsite2/bar

I think we can take whatever internal URL there is, and display the long absolute URL, perhaps with the home_url() (e.g. https://example.com/subsite1/) highlighted in gray or something.

That would make all redirect destinations absolute URLs, which helps remove ambiguity when seeing a destination like /foo when on a subpath subsite and not knowing it it means example.com/foo, or example.com/subsite1/foo.

GaryJones avatar May 26 '24 18:05 GaryJones