Three Concepts
① Static Website:
Http: // 127.0.0.1/regis.html
② Dynamic URL: some values can be dynamically transferred to the request page.
Http: // 127.0.0.1/Regis. php? Id = 45 & Title = good weather today
③ Pseudo static Website:
Pseudo-static is only a rewriting of dynamic URLs. pseudo-static URLs cannot make dynamic URLs static. Search engines do not consider pseudo-static websites as HTML documents, followed by pseudo-static URLs, however, we should focus on removing redundant parameters and standardizing URLs to avoid duplication.
Example: http://v.youku.com/v_show/id_XMJE2NTQ0Oaty.html? Firstime = 2615.
This is a dynamic website: News. php? Lang = cn & Class = 1 & id = 2. From the SEO perspective, it is best to rewrite it:
News-cn-class1-id2.html, which also effectively prevents SQL injection attacks.
However, news-2.html is not concise, which is not conducive to search engine optimization.
Static Page concept:
In most cases, we directly access the PHP file. The PHP script is executed on the server and returns information. For some large websites, the traffic is huge, frequent dynamic operations and database operations will increase the burden on the server.
In actual development, the Cache Technology (page cache, memory cache) is usually used, or the page is static.
Static pages are divided:
Static:
Real Implementation of Dynamic Pages as static pages
Converts a PHP page to an HTML page that does not operate on the database when accessed.
Pseudo static:
The website is only static, but the page still needs to access the database
Why static pages?
① In general, accessing PHP pages is faster than accessing HTML pages.
You can perform stress tests on Apache/bin/AB .exe. This tool can simulate concurrent accesses to a page.
Basic usage of this tool:
AB .exe-N 10000-C 100 http: // localhost: 10092/index. php/home/test/fun.html
Note:
-N 10000 indicates 10000 access requests.
-C 10 indicates the total number of people
Enter a command in the CMD window and view it. A statistical information is returned.
Note: Accessing HTML pages is faster than PhP pages.
② Seo-friendly
From the SEO perspective, Google and Baidu prefer static websites (pseudo static websites)
For example, http: // localhost/news. php? A URL like name = L & id = 2 is not as good as a URL like http: // localhost/news-namel-id2.html
Seo
I. The URL length cannot exceed 255 bytes.
Ii. Make static pages as much as possible
Iii. the meta information is complete, and the meta tags of keywords and description in Meta are complete.
Iv. Make sure that alt information is available for each image.
VI there are frame, IFRAME, and frameset labels (frame causes Baidu to crawl hard and should not be used as much as possible)
③ Prevent SQL Injection