2

Can I configure Tridion to publish to one context (eg /myApp) but write internal links as a different context (eg /myAppBeta/myApp)? I'm hoping to do this by config not code if possible.

I have a Tridion website that runs at a context path in IIS, like

[IIS]/myApp

A 'beta' version of this website has now been deployed, and due to various constraints (including the old site is still running at domain.com/myApp) the beta version has to run at a URL like

domain.com/myAppBeta/myApp

with HTTP rewrites mapping domain.com/myAppBeta to the root of IIS. (so domain.com/myAppBeta/myApp resolves to [IIS]/myApp)

My problem is that Tridion writes and publishes internal links as /myApp/path/to/page. This URL will not be caught by the HTTP rewrite rule, and will result in a 404 response from the existing site (still running at domain.com/myApp).

4

Yes this should be possible, Tridion allows you to do a lot in terms of path configuration:

Publication settings Inside here you can configure your publish path e.g /appBeta/app

Deployer In the storage_conf.xml file in your deployer you can specify the file system path, for example c:/webapps - combined above the publication would publish to c:/webapps/appBeta/app

Here you could have another deployer which pushes to c:/webapps/xyz publishing to this 'target' would give you files located at c:/webapps/xyz/appBeta/app

This should offer some flexible storage options to which you can point IIS too.

Another useful suggestion is the cd_link_conf.xml, this allows you specify pre fixed to URLS returned via content delivery.

Hope this helps with your set up

5
  • Thanks John, I've set Publication settings > Publication URL to /myAppBeta/myApp. Now when I republish the navigation, links are written as myAppBeta/myApp/path/to/page. And most dynamic links are updated as I republish their targets. However it looks like this change isn't affecting some dynamic content delivered through content broker - we have some custom code to render broker links, I'll have to look at that I guess.
    – Joe
    Dec 9 '13 at 2:30
  • Great, glad to help, i'd recommend republishing the content again, this will likely fix your link issues.
    – johnwinter
    Dec 9 '13 at 3:12
  • 1
    Haha - "republish your content" is the the Tridion version of "turn it off and on again", and it still gets me every time.
    – Joe
    Dec 9 '13 at 5:57
  • My broker content is now showing up as expected, but I'm still having problems with binaries/multimedia. I've set the 'Images URL' on the publication to /myAppBeta/myApp/Multimedia, but links to PDF docs are still rendering as eg. /myApp/Multimedia/doc.pdf.
    – Joe
    Dec 9 '13 at 6:08
  • Update: My PDF doc links are working again :) Turns out there were some custom TBBs that had the multimedia URL-path hardcoded as /myApp/Multimedia/. The code now references Publication.MultimediaURL which is better, but probably still unnecessary - all other URLs are written correctly without explicitly referencing Publication metadata in custom code.
    – Joe
    Dec 10 '13 at 0:37

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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