Pseudo-Static is a dynamic Web page by rewriting the URL method to remove the Dynamic Web page parameters, but in the actual Web page directory does not have to implement the existence of rewritten pages. There are 2 ways to generate pseudo-static, one is frame pseudo-static, and the other is to use components to display the ASP suffix as htm. So what is the purpose of designing a Web page as a pseudo-static or static Web page? The main points are as follows:
One, is to cater to search engines, convenient search engine spiders (spider) to crawl the relevant content on the Web page, thereby facilitating the optimization of the site;
Second, is convenient for users to visit the site, a good web page if it is dynamic, users in each other to feel the trust of the other party is not high, but if it is static pages, users trust the Web page is relatively high.
Third, the speed of static web-page improvement
As we all know, whether it is ASP, PHP, JSP,. NET and other dynamic programs, you need to read the call database content, in order to display data, relative to the traffic is relatively large, increased the number of database read, occupy a lot of server resources, affecting the site speed. And the use of the site made static, directly remove the operation of the database read, reduce the link, improve the speed of the site.
Iv. Static web site stability
1, from a security point of view, static Web pages should not be hacked, in addition to open source programs are open source CMS, if the hacker does not know your site backstage, website adoption Program, database
addresses, static Web pages, are less susceptible to hacking attacks.
2, from the stability of the site, if the program, the database out of the problem, will directly affect the site's access, and static pages to avoid such circumstances, not because of the program, and loss
Web site data, the impact of normal open, loss of user experience, the impact of site trust.
Five, how Static
How to make the page static better, for example, such as news.php?id=1 can be properly optimized to 1.html format. This makes it easier for search engines to crawl.
Because search engines like static pages. From the perspective of the Web server, the dynamic link static problem turns into: How to convert a static file name into a parameter.
So how do we implement dynamic link statics?
You can follow these two steps:
1, the page with links to the place, are replaced by new static links. The search engine and browser will use that link to make the request happen. (Some people do the change not on the page, but instead make a dynamic link to the static link to the steering, which is seriously wrong)
2. Use Rewriterule in httpd.conf or. htaccess:
Rewriterule "^/dir/([^./]*) \.html" "/dir/script.cgi?doc=$1″[pt]
The [PT] tag tells Apache to perform all subsequent operations.
In this way, dynamic pages are presented to search engines in the form of static links.
Written in the last, feather tip: As long as the URL is not too long, too many parameters, and do not let spiders into the link black hole, now the search engine technology to treat dynamic links and static links basically no difference. Therefore, if it is not convenient to dynamically link the static webmaster friends, there is no need to spend too much energy on this aspect. In addition, pseudo-static by the server configuration will be dynamically mapped to static pages, a mapping step, pseudo-static processing more occupy the server CPU resources.
Why make the URL of the website pseudo static?