tags:

views:

248

answers:

3
+1  Q: 

url rewrite in IIS

Hello

This question is related to another question which I asked yesterday!

http://stackoverflow.com/questions/220796/list-all-links-in-web-site

I think renaming all the .html files to .asp and changing the links is not good for SEP purposes. Some one told me that isapi plug-in can be used to redirect(301) all .html files to .asp files.

Can any one explain this for me? Searching did not help me much.

Thanks

+1  A: 

We've been using the Ionic rewriter. It seems to work very well. Your application doesn't need any knowledge of the rewriter. You just configure it in IIS, and it redirects your links. It's also free/donationware.

IIS 7 has this feature built in.

Craig Stuntz
A: 

Another option is not to rename the files at all. You could setup an application mapping for html files which will pass them through the asp processor. This will give you dynamic content, etc without any SEO side effects.

As ever, there is a down side. Passing an html file which is intented to be static through the asp processor is less eficient than just serving it up..

Daniel M
+1  A: 

You can use http://urlrewriter.net/ to do what you need. You'll need to set it up so that ASP.NET processes .html extensions. Then you can redirect (301) .html to .aspx very easily with this line in your web.config (in the urlrewriter section):

<redirect url="^(.+)\.html(.+)$" to="$1.aspx$2" permanent='true' />
TAG