开发者

Creating SEO friendly urls in Classic ASP

开发者 https://www.devze.com 2023-02-03 18:19 出处:网络
I have to make all links SEO friendly on our website. I have the following url: http://newark.storeboard.com/board.asp?RegionID=353&ClassAdCatID=740&IsEvent=1&IsCoupon=0&IsBlog=0

I have to make all links SEO friendly on our website.

I have the following url: http://newark.storeboard.com/board.asp?RegionID=353&ClassAdCatID=740&IsEvent=1&IsCoupon=0&IsBlog=0

I need it be: http://neward.storeboard.com/classifieds/events/ConcertsLiveMusic

I have no way of accessing the IIS so this has to be done thru code. 开发者_JAVA技巧 Any ideas about how to achieve this would be greatly appreciated.

Many Thanks, Paul


The standard way of solving this as far as I know is to use a rewrite engine in IIS (such as ISAPI_rewite or IIS7 url rewrite module)

However, you don't have access to IIS you say... That makes it tricky. Two thoughts come to mind:

1) Could you create a dynamic (asp) 404 page that then looks at the request header and does a transfer according to the page requested?

2) Or, and this is rather lame, could you create a static folder structure that goes some way to looking like that url structure?


If you upgrade to IIS7 and use ASP.Net then you can control the URL rewrite module from your code.

I've done something similar to Matts suggestion 1 in the past and it can work. The important thing is you make the 404 page directly feed the true page content and not do a redirect. Otherwise your defeating the point of SEF URLs for SEO gain.

From the few references I still have to the code. asp has a Server.Transfer() function but you may have issues that you can't pass query string parameters. I think I ended up streaming the real page through the 404 page using the MSXMLServerXMLHTTP object and Response.BinaryWrite().

0

精彩评论

暂无评论...
验证码 换一张
取 消