Is it possible to do friendly url (url rewriting)

2019-01-15 10:44发布

I know how to create/implement friendly url in asp.net, but is it possible (and if so - how) to do it in classic asp?

if its impossible, how would google respond (SEO) to creating pages whos sole purpose is to redirect (on load) to a different page?

thanks!

7条回答
做自己的国王
2楼-- · 2019-01-15 10:51

Use a URL rewriter like IIRF or IsapiRewrite that ties into IIS and is processed before ASP/ASP.NET/PHP get the request.

查看更多
Emotional °昔
3楼-- · 2019-01-15 10:51

In IIS 7 use Microsoft's own free URL Rewrite!

查看更多
放荡不羁爱自由
4楼-- · 2019-01-15 10:52

IsapiRewrite, yes, I agree with that recommendation.

To answer your other question, Google won't care, just 301 redirect them. Make sure you don't have duplicate content, and don't even 302 redirect. If you 301 redirect, the Google should keep your PageRank concentrated on a single page. (This is what the SEO gurus at work tell me.)

查看更多
疯言疯语
5楼-- · 2019-01-15 10:54

ISAPI_Rewrite v3 will satisfy your needs. There a friendly manager and quite an easy syntax (well anyway if you encounter problems, you may address their support forum).

查看更多
贼婆χ
6楼-- · 2019-01-15 10:56

You need an ISAPI module. It's quite a bit more complex than URL rewriting in ASP.NET, so you can try a commercial rewriter like this one.

Or you can try the Ionic's Isapi Rewrite Filter, which is free, at http://www.codeplex.com/IIRF

查看更多
贼婆χ
7楼-- · 2019-01-15 11:03

You can also do it without a Rewrite Filter using a custom 404 page. In that you can use Server.Transfer or Server.Execute to redirect off to the correct page. Trouble is you loose your QueryString object doing it that way but it sort of works with a little love and cuddling.

If you want to avoid Server.Transfer et al you can also wrap all your templates in objects and included them all and just call a render function on the template you want to render, leads to big code over-head but its easily overcome by modern server brute force power!

查看更多
登录 后发表回答