I have just rewritten a large site (600+ pages, a mixture of .htm and .html) so that there is now an .aspx page
with exactly the same name as the original .htm(l) file for every page in the site. So for page1.htm there is now a page1.aspx, etc...
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.
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?
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.
banksidepoet
Participant
774 Points
862 Posts
Redirecting requests for .htm files to .aspx files
Mar 13, 2012 12:17 PM|LINK
Hi.
I have just rewritten a large site (600+ pages, a mixture of .htm and .html) so that there is now an .aspx page with exactly the same name as the original .htm(l) file for every page in the site. So for page1.htm there is now a page1.aspx, etc...
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.
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?
Thanks.
kedarrkulkar...
All-Star
35547 Points
5696 Posts
Re: Redirecting requests for .htm files to .aspx files
Mar 13, 2012 12:40 PM|LINK
http://www.dirigodev.com/blog/301-redirect-html-pages-to-aspx-pages
http://www.ifinity.com.au/Blog/entryid/66/how-to-301-redirect-htm-or-html-pages-to-dotnetnuke-aspx-pages
hope this helps...
</div>KK
Please mark as Answer if post helps in resolving your issue
My Site
banksidepoet
Participant
774 Points
862 Posts
Re: Redirecting requests for .htm files to .aspx files
Mar 13, 2012 12:52 PM|LINK
Thanks.
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.
Is there no way of just using what IIS7.5 has?
banksidepoet
Participant
774 Points
862 Posts
Re: Redirecting requests for .htm files to .aspx files
Mar 13, 2012 06:31 PM|LINK
This is now resolved.
I have installed the Url Rewrite Module and set an action on an Inbound Rule.
I am checking for the following regex pattern: (.*)\.htm.*
I am redirecting (301) to: {R:1}.aspx