Shoban
Shoban

Reputation: 23016

url rewrite in IIS

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

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

Upvotes: 1

Views: 552

Answers (3)

Daniel M
Daniel M

Reputation: 1597

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 downside. Passing an HTML file which is intended to be static through the asp processor is less efficient than just serving it up..

Upvotes: 0

TAG
TAG

Reputation: 1272

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' />

Upvotes: 1

Craig Stuntz
Craig Stuntz

Reputation: 126587

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.

Upvotes: 1

Related Questions