Quantcast
Channel: URL Rewrite Module
Viewing all articles
Browse latest Browse all 2482

Rewrite subdomain/* to maindomain/folder/*

$
0
0

What is wrong with this ??

<rule name="Rewrite to CDN" stopProcessing="true"><match url="(.*)" /><conditions logicalGrouping="MatchAll" trackAllCaptures="false"><add input="{HTTP_HOST}" pattern="^cdn\.mydomain\.com$" /></conditions><action type="Rewrite" url="www.mydomain.com/assets{R:1}" appendQueryString="true" /></rule>

I want the request from : "cdn.mydomain.com/thefile.png"  be rewriten to phys. file on main domain "www.mydomain.com/assets/thefile.png"

I have tried many, unsuccessfully.  I am really not sure why this up won't work.  I get a 404 not found, obviously.

Thanks in advance!


Viewing all articles
Browse latest Browse all 2482

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>