[2 days left] What’s wrong with your cloud strategy? Learn why multicloud solutions matter with Nimble Storage.Register Now

x
?
Solved

IIS 7 URLreWrite Rule

Posted on 2011-09-27
4
Medium Priority
?
317 Views
Last Modified: 2012-06-27
Hi Experts,

I am looking for a URLreWrite module rule to be written.

I want all requests to
*.truesecrets.com.au to be forwarded to *.truesecrets.com.au/strange-tours-melbourne/

so for example
m.truesecrets.com.au is forwarded to m.truesecrets.com.au/strange-tours-melbourne/
m.truesecrets.com.au/test is forwarded to m.truesecrets.com.au/strange-tours-melbourne/test
www.truesecrets.com.au is forwarded to www.truesecrets.com.au/strange-tours-melbourne/
www.truesecrets.com.au/test is forwarded to www.truesecrets.com.au/strange-tours-melbourne/test

Thanks

C
0
Comment
Question by:Craig Lambie
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
4 Comments
 
LVL 10

Expert Comment

by:gaurav05
ID: 36709414
0
 
LVL 1

Author Comment

by:Craig Lambie
ID: 36709556
This is a complicated rule, I want some guidance on writing this actual rule, not general rules, I can google that :) - please.
0
 
LVL 30

Accepted Solution

by:
Brad Howe earned 1000 total points
ID: 36710008
Give this a shot.

Capture ALL URIs, check that it is not already a virtual root of /strange-tours-melbourne and then redirect to /strange-tours-melbourne/<the path in the url> IF the url is in the format domain/<path>

<rule name="Redirect /(.*) to /strange-tours-melbourne/(.*) " enabled="true" stopProcessing="true">                    
<match url="(.*)" />                    
 <conditions logicalGrouping="MatchAny">  
  <add input="{REQUEST_URI}" pattern="^/strange-tours-melbourne/(.*)$" negate="true" />                      
 </conditions>  
<action type="Redirect" url="http://{HTTP_HOST}/strange-tours-melbourne/{R:1}" appendQueryString="false" />                
</rule>

cheers,
Hades666
0
 
LVL 1

Author Closing Comment

by:Craig Lambie
ID: 36714456
Exactly what I wanted, thanks :)
0

Featured Post

Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

OfficeMate Freezes on login or does not load after login credentials are input.
As tax season makes its return, so does the increase in cyber crime and tax refund phishing that comes with it
This tutorial will give a an overview on how to deploy remote agents in Backup Exec 2012 to new servers. Click on the Backup Exec button in the upper left corner. From here, are global settings for the application such as connecting to a remote Back…
This tutorial will walk an individual through the steps necessary to join and promote the first Windows Server 2012 domain controller into an Active Directory environment running on Windows Server 2008. Determine the location of the FSMO roles by lo…

649 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question