This site has collected many articles about pseudo-static. This article already exists on this site, but the main considerations are more detailed. You can refer to it. At present, major search engines such as Google, Baidu, and Yahoo have already implemented dynamic pages such as ASP.NET. , php has good support, As long as the parameters behind the dynamic page are not too long, for example, they are controlled within 3 parameters, and the page content is optimized, the major search engines will not even index this type of page worse than the static HTML page. I have a website whose entire site is an ASP page. Its inclusion and ranking far exceed that of many static page websites.
Of course, any website, no matter how good its structure is, will ultimately fail to retain users if it is not supported by content. The development speed of search engines is no longer at the level where it was almost impossible to include dynamic pages. Major search engines are making every effort to develop their own indexing technology, and general dynamic pages can be easily included in their collection.
Some websites require strong interactivity with users, with page refreshes very quickly and a lot of updated content. This type of website is not suitable for generating static pages because the information on the website is time-sensitive. If you generate HTML static pages, and then search engines index your content pages and display them to users, the information users see may be outdated and invalid information, which is a bad experience for users. Therefore, I suggest that dynamic pages of such websites should not generate HTML as much as possible, which not only takes up a lot of space, but also may cause a bad search experience for users.
Although we say that the inclusion and ranking effects of dynamic pages and static HTML pages are not that bad now, as long as you control them well. But static pages still have some advantages. If your content is basically valid for a long time and will not be changed easily, then I still recommend that you generate static page HTML.
This article only discusses the method of generating static pages in asp. There are many ways to generate html in asp.
1. FSO, ado method generates html. This type of method is used a lot. For example, on the entire Piaoyi blog site, except for statistics and the TAG system, which are dynamic, all other pages are generated as static pages. Of course, Piaoyi Blog ranks very well in Google and Baidu.
2. Use components such as ISAPI_Rewrite to rewrite, which is easy for webmasters with their own servers, but friends with virtual hosts will have a little trouble. Unless you ask the service provider to install this plug-in, and then submit the program parameters to the server for conversion, it looks static. , actually uses a static path to access the contents of the database. It plays a certain role in search engine revenue, and many webmasters are struggling to find it just for this purpose.
3. This is the key content to be discussed in this article. The asp path is pseudo-static. Please see the detailed breakdown below.
If you want to make the ASP page look static, but it is not completely static, the purpose is to make it more friendly to search engines. It’s not an exaggeration to please the hard-working webmasters. You can use this method. For example, the path of show.asp?id=1 can be converted to show/?1.html, show.asp?id=1&id2=2 can be converted to show/?1-2.html, etc.
For example: we need to convert the URL form of http://www.piaoyi.org/show.asp?a=3&b=8 into http://www.piaoyi.org/show/?3-8.html .
Method: Create the directory show, put a system default homepage file under show, such as default.asp, and 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
''At this point, we have obtained the a and b parameters required by the show.asp file.
''Use this parameter below to open the database and obtain the content as before.
%>
The principle is simple. Just use Request.ServerVariables(QUERY_STRING) to get the received value (the parameter after ?). For example, http://www.piaoyi.org/show/?3-8.html receives 3-8.html, for 3- 8. To filter html, we only need to obtain parameters 3 and 8, and then retrieve data from the database based on 3 and 8, which is the same as dynamic ASP.