This also means that all requests on DEV and STAGING will fail since the files doesn't exists.
Wouldn't it be possible to have an URL re-write that handle this ?
So when the domain doesn't contain maindomain.tld then use maindomain.tld/path/to/media
I'm not sure i understand your question. Do you mean you have a website with multiple domains and want to redirect the media request to different domains?
If thats the case you could add a rule for every domain you want to redirect to and add a extra add a condition to the rule. For example:
URL rewrite for media only when not on production ?
I have a website with a rather large media section.
So to avoid copying media between environments I've added the following to the UmbracoDeploy.Settings.config file
This also means that all requests on DEV and STAGING will fail since the files doesn't exists.
Wouldn't it be possible to have an URL re-write that handle this ? So when the domain doesn't contain maindomain.tld then use maindomain.tld/path/to/media
Any suggestions on how this should look ?
Hi Sebastian,
You could use something like this:
This redirects the media calls to the live domain.
Erik
This works flawlessly in combination with config transforms
But what if you're running a website with multiple domains ? In your example the domain is hardcoded, are there any way around that ?
I'm not sure i understand your question. Do you mean you have a website with multiple domains and want to redirect the media request to different domains?
If thats the case you could add a rule for every domain you want to redirect to and add a extra add a condition to the rule. For example:
is working on a reply...