ocadotechnology / djshorty

A Django URL shortening app
Apache License 2.0
1 stars 2 forks source link

Short Urls only work on specific URLs and domain-wide #18

Open ChrisMukherjee opened 8 years ago

ChrisMukherjee commented 8 years ago

If a short URL is created for https://euw1-aperture.eu-west-1.aws.ocd.prd.lastmile.com/aperture/ then the short URL will only work for that one page, and not any page on that domain. E.g: https://links.ocado.com/camera/competition/40 and https://camera.ocado.com/competition/40 will not redirect to https://euw1-aperture.eu-west-1.aws.ocd.prd.lastmile.com/aperture/competition/40

benbacardi commented 8 years ago

Most standard URL shorteners don't support preserving the path - you just get a 404 if you don't go to the exact short URL, which is what Shorty currently does.

Do we want to support this?

benbacardi commented 8 years ago

If we do want to support this, should it be...

mikebryant commented 8 years ago

It could be a nice feature. We might need to think carefully about the interaction of this and domain based shortening, vs path based. (Should it only work for path based shortening?)

I don't think turning it on by default would be bad - any circumstances where someone's trying to use this would currently result in a 404 in any case.

benbacardi commented 8 years ago

(Should it only work for path based shortening?)

I think it actually makes more sense for domain based shortening. foo.oca.do/hello -> www.foo.com/hello vs oca.do/foo/hello -> www.foo.com/hello

Although both are valid...