This project is read-only.

From Development to Production

Topics: General, Troubleshooting
Apr 2, 2013 at 1:54 PM
Hi, I have some links in my page content that points to development server and the same ones in production points to pro server.

For example: Content->Pages



Is there a way that I can replace ( & to something like {common_url}/mypage so I want have to change the url every-time that I move something from dev to pro?
Apr 2, 2013 at 2:47 PM
Why not set up the URL's for the hyperlinks as relative urls? As long as the path part is the same on dev and live it should work.

For example:

<a href="/mypage">Your Link</a>
Apr 2, 2013 at 3:58 PM
I have some links that are pointing to a dev server which the website is not hosted and same goes for pro. That's why relative url will not work on this case. Any other ideas are welcome.
Apr 2, 2013 at 4:02 PM
I don't understand what you're saying, but good luck.
Apr 2, 2013 at 4:49 PM
The solution would be what TheMonarch proposed. So for the files that are on the other server, make a copy of them. Right? Making a copy is easier than using absolute urls which you will have to edit any time you move the site or location or a resource.
Apr 3, 2013 at 8:02 AM
Maybe my question was not very clear. My links are pointing to a different application other than Orchard, and I have one app for dev and one for pro.
Apr 3, 2013 at 11:52 AM
You could implement this by creating a class that implements IHtmlFilter. The filter would replace {common_url} with the actual common url. Vandelay.Industries has a nice example (I believe it's called something like RelativeUrlFilter).
Apr 3, 2013 at 1:33 PM
Nice, I ll take a look. Thank you