Closed (works as designed)
Project:
ShURLy
Version:
7.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Reporter:
Created:
7 Sep 2010 at 16:49 UTC
Updated:
27 Dec 2013 at 15:08 UTC
Jump to comment: Most recent
Comments
Comment #1
jjeff commentedBut if you add a root URL, then the short URLs would be less short! ;-)
ShURLy short URLs *should* do a good job of trying not to conflict with any existing paths or path aliases on your site - for instance, users can't create custom short URLs like "node" or "user". They also can't create short URLs with "/" in them. So even if a user did create a short url of "og" and you later tried to enable Organic Groups module, the worst you'd have to do would be to delete one short URL.
I can understand why you might want to have the safety of a root URL for the short URLs, but for performance reasons ShURLy does its business in hook_init() so that it doesn't incur a full drupal bootstrap. Additionally, it does some quick validation to see if the incoming URL could even be a valid short URL. Part of this validation is checking to see if there's a "/" in the URL. If there is, then ShURLy doesn't even do a database lookup. It makes for great performance, but it does also make things a bit more rigid.
Can you explain more about your use case? Perhaps there's a better way to solve the problem you're having.
Comment #2
jorgeegomez commentedJeff,
I understand the trade-off in favor of the quick validation. Having a short prefix (such as /go/) wouldn't lengthen the URL too much and make for a better-organized path system (I have this in mind for intranet use), but I think the design of the module cleverly prevents this by avoiding the full drupal load.
And as you point out, the ideal use case for ShURLy is on a domain of its own, which could be useful even in an internal case.
Comment #3
picxelplay commentedI think it would be an asset to add /go/ (or similar) to the prefix of a ShURLy url. This would be handy for cloaking affiliate links, just like the many go.php scripts out there.
Comment #4
picxelplay commentedComment #5
funature commentedi'd like to have this feature too, or could somebody provide a patch for the people who needs this feature?
Comment #6
jibus commentedI guess the project Gotwo (https://drupal.org/project/gotwo) is more appropriate for this.