Url "redirect" in use @ https://help.dreamhost.com/?


#1

help-dreamhost-com seems to have magic links, but I know there’s no such thing.

So how do all these urls resolve to the same page:
https://help.dreamhost.com/hc/en-us/articles/215252448-DreamHost-overvie
and
https://help.dreamhost.com/hc/en-us/articles/215252448-DreamHo
and I’d add more links, but was just informed that new users can only include 2 links.

suffice to say that I was going to include a “clever” url similar to:
… /hc/en-us/articles/215252448-DreamMagicTrick
and … /hc/en-us/articles/215252448

tia,
–Dan


#2

Some web sites use this technique to allow descriptive URLs for pages, rather then just inscrutable ID numbers. The ID of that help page is 215252448, and that uniquely identifies it. The help site’s software (Zendesk) allows a human/SEO-readable description to be added to the URL. Zendesk ignores the description when looking up the page’s content by ID number.

Similarly, the forum software you’re reading now (Discourse) uses the same technique, so this page can be linked with an URL like:

https://discussion.dreamhost.com/t/this-is-not-a-good-description/69011

Note that Discourse perm-redirects that bogus URL to the correct/canonical URL for 69011.


#3

ok…I get it.
Zendesk and Discourse are rewriting the url.

My question is:
Exactly what are they using and how are they doing it?

  • Apache mod_rewrite?
  • nginx rewrite?

What conditions? What rules?

Do you know the code that implements this?

You’re saying this is a feature of discourse; a feature that lets you put some descriptive text in the url?

Discourse is limited–you can’t put more than one directory in the path leading up to the ID–this fails:
https://discussion.dreamhost.com/t/url-redirect-in-use-https-/YetMoreURLText/help-dreamhost-com/69011