rewrite from one domain to another but keep the subdomain

113 views
Skip to first unread message

Bob Mancarella

unread,
Aug 26, 2015, 2:30:47 AM8/26/15
to UrlRewrite
I need to go from 


to 


Can this be done?

I have tried this but it doesn't seem to do anything.

    <rule match-type="wildcard">
        <from>*.domain1.com/*</from>
        <to type="redirect">$1.domain2.com/$2</to>
    </rule>


Avlesh Singh

unread,
Aug 26, 2015, 2:34:10 AM8/26/15
to UrlRewrite
By default, rewrite rules work on URI path and query parameters.

For everything else (request headers, session attributes etc), you should use <condition>


- Avlesh

--
You received this message because you are subscribed to the Google Groups "UrlRewrite" group.
To unsubscribe from this group and stop receiving emails from it, send an email to urlrewrite+...@googlegroups.com.
To post to this group, send email to urlre...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/urlrewrite/34b14807-ea8a-4bb1-9b18-29c709dc7bcc%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

bobmanc

unread,
Oct 13, 2015, 4:22:41 AM10/13/15
to UrlRewrite
So how can I do something like this using conditions?

    <rule match-type="wildcard">
        <from>*.domain1.com/*</from>
        <to type="redirect">$1.domain2.com/$2</to>
    </rule>



Reply all
Reply to author
Forward
0 new messages