Answered by:
Url Rewriting

Question
-
Hi All,
I wish to rewrite the Url in the below stated way.
If the Url is http://MyApp.cloudapp.net/Unit/Unit1 i want to rewrite it as http://MyApp/Unit/Unit1.
Is this possible.
Please somebody guide me on this as iam new to azure.
Thanks,
Pankaj
Wednesday, December 29, 2010 4:26 AM
Answers
-
Steve shows you to use CNAME to map www.myapp.com to myapp.cloudapp.net. Once you do that your clients site can be accessed through either www.myapp.net or myapp.cloudapp.net.
You do the CNAME mapping on your DNS providers website. Steve explains how to do this for GoDaddy but the process would be similar on other DNS providers.
- Marked as answer by Allen Chen - MSFT Friday, January 7, 2011 8:22 AM
Wednesday, December 29, 2010 7:49 AM
All replies
-
Steve Marx has a post explaining how to use CNAME to map a custom domain to the cloudapp.net domain.Wednesday, December 29, 2010 6:36 AM
-
Hi Neil,
Thanks for a quick reply.I would like to explain the issue at my end more clearly.
We have our application hosted on cloud on http://MyApp.cloudapp.net/Unit/Unit1 .what the client wants is that he wants to remove the ".cloudapp.net" completely from the url.
Please can you explain how can this be done in light of the post made by Steve.
Thanks,
Pankaj
Wednesday, December 29, 2010 6:51 AM -
Steve shows you to use CNAME to map www.myapp.com to myapp.cloudapp.net. Once you do that your clients site can be accessed through either www.myapp.net or myapp.cloudapp.net.
You do the CNAME mapping on your DNS providers website. Steve explains how to do this for GoDaddy but the process would be similar on other DNS providers.
- Marked as answer by Allen Chen - MSFT Friday, January 7, 2011 8:22 AM
Wednesday, December 29, 2010 7:49 AM -
Sorry about the late answer, but this thread still pops up in the search and i dont really see an answer to the question here.
The following rule should do the trick
<rewrite> <rules> <rule name="removing cloudapp from url"> <match url="(.*)" ignoreCase="true" /> <conditions> <add input="{HTTP_HOST}" pattern="^(www\.)?MyApp\.cloudapp\.net$" ignoreCase="true" /> </conditions> <action type="Redirect" url="http://MyApp/{R:1}" /> </rule> </rules> </rewrite>
the (www\.)? part is there in case someone would type in www.myapp and the ignoreCase parameter is self explanatory
- Proposed as answer by Siggi2000 Thursday, June 5, 2014 11:03 AM
Thursday, June 5, 2014 11:03 AM