More detailed ASP pseudo-static method and ASP static discussion _ Application technique

Source: Internet
Author: User
At present, the major search engines such as Google, Baidu, Yahoo has the dynamic page such as asp,php has a good support, as long as the dynamic page after the parameters do not too long, such as control in 3 parameters, the page content to do some optimization, the major search on the category of pages included even no worse than static HTML page, I have a full station is ASP page site, its collection and ranking far more than a lot of static pages of the site.

Of course, any site, the structure is good, if there is no content as a support, the end is still unable to stay users. The development speed of the search engine, already is not at the beginning almost cannot include the level of dynamic page, each big search is in full development own index technology, the general dynamic page in them there already is can easily into under under.

Some sites, its requirements and users have a strong interaction, interactivity, page refresh quickly, updated content is also many, such sites are not suitable for generating static pages, because the information on the site is time-sensitive, if you generate HTML static page, and then the search engine and indexed your content page, show the user to see, And the information that the user sees is likely to be outdated invalid information, this is a bad experience for the user. Therefore, I suggest that the dynamic pages of such a site as far as possible do not generate HTML, both occupy a lot of space, but also may cause a bad search experience for users.

Although we say, now dynamic page and static HTML page collection, ranking effect is not bad to there, only you control good. But the static page still has a little advantage. If your content, basically for a long time effective, will not easily change, then I suggest you generate static page HTML.

This article discusses only the methods that ASP generates static pages. ASP generates HTML in a number of ways.

1, Fso,ado way to generate HTML. Many of these methods are used. For example, floating easy blog full station, in addition to statistics, the tag system is dynamic, the other all generated static pages. Of course, floating easy blog in Google, Baidu rankings are very good.

2, the use of components such as Isapi_rewrite rewrite, have their own server webmaster good to do, the virtual host friend is a little trouble, unless the request service provider to install the plug-in, and then the program parameters submitted to the server to achieve transformation, it appears to be static, is actually using static path to access the content of the database For the search engine revenue has a certain effect, and many webmaster is for the struggle to find.

3, this article is to discuss the key content. ASP path pseudo static. Please see detailed breakdown below.

ASP page if you want to make it look static, not completely static, the goal is to make it more friendly to the search engine. Please, as a hard webmaster are not too. You can use this method. such as the show.asp?id=1 path can be converted to show/?1.html,show.asp?id=1&id2=2 conversion to show/?1-2.html and so on.

For example, we need to convert the URL form "Http://www.piaoyi.org/show.asp?a=3&b=8" to "http://www.piaoyi.org/show/?3-8.html".

Method: Set up a directory show, put down a system default home file in show, such as Default.asp, write the following code in Default.asp:

<%
Dim id,id1,id2,a,b
Id=request.servervariables ("Query_string")

Id1=replace (ID, ". html", "")
Id2=split (ID1, "-")

A=id2 (0)
B=id2 (1)
Response.Write "A parameter value is:" &a& "<br>b parameter value is:" &b
"Here you've got the A and B parameters for the show.asp file."
"Use this parameter to open the database as before and get the content.
%>

The principle is simple. is to use Request.ServerVariables ("query_string") to obtain the received value (?), such as http://www.piaoyi.org/show/?3-8. HTML to receive is 3-8.html, filter 3-8.html, we only need to get parameters 3 and 8, according to 3 and 8 to retrieve data from the database, followed by the same as the dynamic ASP.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.