Answered by:
redirect from one folder to another?

Question
-
User1195066965 posted
i've looked for a half an hour (not the best search utility on this forum) and i can't find the simple example of redirecting from one folder to another. all we're trying to do is redirect from this: http://domain.com/folder1 to this: http://domain.com/folder2 we were using another utility so we're new to this utility. an example of this would be of great help. thanks!Friday, December 3, 2010 9:33 PM
Answers
-
User1195066965 posted
enabling request tracing isn't helping. the rewrite area is missing from iis. i uninstalled and reinstalled tracing. i even edited the applicationhost.config file as outlined here: http://blogs.iis.net/richma/archive/2010/05/26/missing-failed-request-tracing-freb-trace-areas.aspx
the rewrite area is still missing.
anyone?! running iis 7.5 on server 2008 r2.
- Marked as answer by Anonymous Tuesday, September 28, 2021 12:00 AM
Tuesday, December 7, 2010 5:44 AM
All replies
-
User-1853252149 posted
Sounds like you want something like:
<rewrite>
<rules>
<rule name="Redirect Folder">
<match url="^folder1/*"/>
<action type="Redirect" url="folder2/{R:1}" />
</rule>
</rules>
</rewrite>From memory , so don't kill me if it's wrong. :)
Jeff
Monday, December 6, 2010 11:36 AM -
User1195066965 posted
tried it (using my folder names) and it's giving me a 404 error. any idea why?Monday, December 6, 2010 11:45 AM -
User744767459 posted
Hi,
You can try the following rule:
<rewrite>
<rules>
<remove name="RedirectToBlog" />
<rule name="RedirectToBlog" stopProcessing="true">
<match url="^folder1/?$|^folder1/(.*)$" />
<conditions />
<serverVariables />
<action type="Redirect" url="folder2/{R:1}" />
</rule>
</rules>
</rewrite>URL Rewrite Module
http://learn.iis.net/page.aspx/734/url-rewrite-module/
If you encounter any problem, please update here.
Tuesday, December 7, 2010 3:38 AM -
User1195066965 posted
we got a 404 with that too.
folder2 is a virtual directory in the root of the domain, if that makes a difference.
Tuesday, December 7, 2010 4:10 AM -
User744767459 posted
Hi,
You can enable Failed Request Tracing to see how rewrite rule was applied to request URL.
Using Failed Request Tracing to Trace Rewrite Rules
http://learn.iis.net/page.aspx/467/using-failed-request-tracing-to-trace-rewrite-rules/
Thanks.
Tuesday, December 7, 2010 4:16 AM -
User1195066965 posted
enabling request tracing isn't helping. the rewrite area is missing from iis. i uninstalled and reinstalled tracing. i even edited the applicationhost.config file as outlined here: http://blogs.iis.net/richma/archive/2010/05/26/missing-failed-request-tracing-freb-trace-areas.aspx
the rewrite area is still missing.
anyone?! running iis 7.5 on server 2008 r2.
- Marked as answer by Anonymous Tuesday, September 28, 2021 12:00 AM
Tuesday, December 7, 2010 5:44 AM -
User744767459 posted
Hi,
Sorry for delay.
the rewrite area is still missing.
It is probably the Failed Request Tracing Rule was added before URL Rewrite Module installed. You can doulbe-click the tracing rule, naviaget to "Select Tracing Provider" dialog window, high-light "WWW Server" provider, then make sure the provider property "Rewrite" checkboxt was selected.
Thanks.
Sunday, December 12, 2010 2:45 AM -
User1195066965 posted
the rewrite area is missing. meaning the place where you just told me to go and check the checkbox, rewrite doesn't exist there. take a look at the link that was in my last post.
Sunday, December 12, 2010 2:58 AM -