Redirecting requests for .htm files to .aspx fileshttp://forums.asp.net/t/1779799.aspx/1?Redirecting+requests+for+htm+files+to+aspx+filesTue, 13 Mar 2012 18:31:12 -040017797994877544http://forums.asp.net/p/1779799/4877544.aspx/1?Redirecting+requests+for+htm+files+to+aspx+filesRedirecting requests for .htm files to .aspx files <p>Hi.</p> <p>I have just rewritten a large site (600&#43; pages, a mixture of&nbsp;.htm&nbsp;and .html) so that there is now an .aspx page <strong>with exactly the same name</strong> as the original .htm(l) file for every page in the site. So for page1.htm there is now a page1.aspx, etc...</p> <p>&nbsp;</p> <p>I beed to set up something in IIS (7.5) which I have admin access to, so that every request for pagex.htm or page x.html is redirected to pagex.aspx with a 301 permanent redirect.</p> <p>Easy way to do this? Google offers confused and contradictory (and proprietary) solutions. As I have admin access to IIS, there must be a simple config I can perform?</p> <p>Thanks.</p> 2012-03-13T12:17:09-04:004877611http://forums.asp.net/p/1779799/4877611.aspx/1?Re+Redirecting+requests+for+htm+files+to+aspx+filesRe: Redirecting requests for .htm files to .aspx files &lt;div sizcache=&quot;2&quot; sizset=&quot;23&quot;&gt; <p><a href="http://www.dirigodev.com/blog/301-redirect-html-pages-to-aspx-pages">http://www.dirigodev.com/blog/301-redirect-html-pages-to-aspx-pages</a></p> <p><a href="http://www.ifinity.com.au/Blog/entryid/66/how-to-301-redirect-htm-or-html-pages-to-dotnetnuke-aspx-pages">http://www.ifinity.com.au/Blog/entryid/66/how-to-301-redirect-htm-or-html-pages-to-dotnetnuke-aspx-pages</a></p> <p>hope this helps...</p> &lt;/div&gt; 2012-03-13T12:40:15-04:004877643http://forums.asp.net/p/1779799/4877643.aspx/1?Re+Redirecting+requests+for+htm+files+to+aspx+filesRe: Redirecting requests for .htm files to .aspx files <p>Thanks.</p> <p>I've come across both of these sites before. The first uses IIS6 (I have 7.5) and the dialogues don't resemble what I have. The second uses non-free proprietary software.</p> <p>Is there no way of just using what IIS7.5 has?</p> 2012-03-13T12:52:44-04:004878223http://forums.asp.net/p/1779799/4878223.aspx/1?Re+Redirecting+requests+for+htm+files+to+aspx+filesRe: Redirecting requests for .htm files to .aspx files <p>This is now resolved.</p> <p>I have installed the Url Rewrite Module and set an action on an Inbound Rule.</p> <p>I am checking for the following regex pattern: (.*)\.htm.*</p> <p>I am redirecting (301) to: {<span color="#0000ff" size="2" style="color:#0000ff; font-size:small"><span color="#0000ff" size="2" style="color:#0000ff; font-size:small">R</span></span><b><span size="2" style="font-size:small">:</span></b><span size="2" style="font-size:small">1</span><span color="#a52a2a" size="2" style="color:#a52a2a; font-size:small"><span color="#a52a2a" size="2" style="color:#a52a2a; font-size:small">}</span></span><span size="2" style="font-size:small">.aspx</span></p> <p><span size="2" style="font-size:small"></span></p> 2012-03-13T18:31:12-04:00