Is it possible to do friendly url (url rewriting) in classic asp?

后端 未结 7 1882
春和景丽
春和景丽 2020-12-01 22:36

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 (SE

相关标签:
7条回答
  • 2020-12-01 23:07

    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!

    0 讨论(0)
  • 2020-12-01 23:10

    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).

    0 讨论(0)
  • 2020-12-01 23:12
    • If your classic ASP application runs on a IIS7 then I would totally suggest creating a web.config and using ASP.NET url rewriting feature. I use that for my projects and it works perfectly!
    • If it runs on an older IIS then ISAPIRewrite or IIRF. Nevertheless I would try as hard as possible to upgrade to IIS7 as it will make things so much easier.
    0 讨论(0)
  • 2020-12-01 23:12

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

    0 讨论(0)
  • 2020-12-01 23:12

    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.)

    0 讨论(0)
  • 2020-12-01 23:24

    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

    0 讨论(0)
提交回复
热议问题