-3

I have couple of questions on changing URLs dynamically -

=> What is best way to make tinyTurl for the long URLs I have in my Tridion based project.

e.g. for a long url like http://www.abc.com/questions/5208/how-to-override-page-publish-url-or-path-while-publishing, I want to share it in this format https://tinyurl.com/nzol7h4

=> What is the best way to rewrite/translate the url or section of URL like page name.

e.g. for a long url like http://www.abc.com/questions/5208/-o-path-how-to override-page-publish-url-mientras-publicación

1

3 Answers 3

3

You may create your tiny url out from Tridion system by using standard practice (I assume you are using C#/.NET) - You may refer this SO link:

https://stackoverflow.com/questions/366115/using-tinyurl-com-in-a-net-application-possible

Regarding URL rewrite also you may want to make use of IIS Rewrite Rule Engine or use .htaccess file for redirects. You may also want to explore the HttpModule for custom business logic and URL rewriting based on some complex business logic

2
  • Thanks, Pankaj. Regarding url rewrite, let me clarify. We are looking for something like vanity url (similar re-writing the url). Normally this is OOTB feature in most of the WCM, do we have any such thing in Tridion or we have to use custom IIS Rewrite rule engine normaly used with ASP.net.
    – Vinny
    Commented Jun 24, 2014 at 12:14
  • You can make use of Structure groups for vanity urls. Please note Structure Group are not only a special kind of Folder to contain pages but these also defines the URL strategy for your application. You may search on google for Vanity URLs in Tridion, you can see how easy it would be to manage through Structure Group Commented Jun 24, 2014 at 12:43
3

Unlike most WCM systems, Tridion is not serving your website. It is publishing content that your application (which may not even be a website) consumes. Ask yourself, "How would I do this without Tridion?" and "What parts of that solution need to be content managed?"

If you can simply shorten your URLs using existing Structure Groups then that's a simple, OOTB, solution right there. If you need true vanity URLs (i.e. short, customisable URLs that redirect to the full URLs) then maybe you could achieve that by implementing some functionality in your application that is then fed in some way by data that is content managed.

In a previous implementation (many years ago), I utilised an ISAPI redirect plugin for IIS, which was fed by a simple configuration file that was content managed and published from Tridion. That's just one (old) example... I'm sure there are hundreds of other possibilities (check the questions linked to in Raj's comment on your question for a start).

1
2

You can use Page Metadata so that editors can define url aliases for each page, then this metadata is available in the CD Broker db. This means that an HTTP Module (if for a .Net website) or custom 404 page can query the Broker for the currently requested URL and try to find a page with this path defined in metadata. If a page is found, then it redirects the visitor to the page.

See: http://tridionfanboy.wordpress.com/2012/03/06/alternate-urls-in-sdl-tridion-2011/

https://code.google.com/p/tridion-practice/wiki/LinkMetaRedirector

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.