Home > Backend Development > PHP Tutorial > 48 PHP page staticization

48 PHP page staticization

WBOY
Release: 2016-07-29 09:13:21
Original
1026 people have browsed it

  1. URL rewrite (pseudo-static)

HTML pure static page has four advantages:
1. There is no need to call the database when loading, and the opening speed is fast.
2. Reduce the load on the server in data response.
3. From a security perspective, purely static web pages are not susceptible to hacker attacks.
4. In terms of website stability, even if there is a problem with the website code or database, the static website will not be affected.
The biggest disadvantage of true static is that the program generates a large number of files, takes up too much website space, and increases website production costs.

Pseudo-static url rewriting is the process of intercepting incoming web requests and automatically redirecting the requests to other urls. Its main purpose is to remove the parameters of dynamic web pages by rewriting URLs, thereby making it more convenient for search IndexIncluded by Qing.
There are 5 advantages of pseudo-static:
1. It is easy to maintain. The web page changes automatically every day, so no maintenance is required or the amount of maintenance is greatly reduced.
2. It can easily optimize the search index engine and be easily included by the search index engine.
3. The length of the URL is shortened, and the actual path of the file is hidden to improve security and make it easier for users to remember and input.
4. It occupies a relatively small space and does not occupy nearly as much space as pure static.
5. Security performance: Hiding or encrypting the URL address prevents hackers from finding the real dynamic page. At the same time, dynamic files do not require high permissions, thus avoiding the injection of Trojans.
The biggest disadvantage of pseudo-static is that it takes up a certain amount of CPU usage and increases the server's response time.
To sum up, how should we choose?
1. Since true and false static and pseudo static have the same effect on search engines, we can choose pseudo static. After all, its advantage is that pure static is irreplaceable. 2. Extensive use of pseudo-static will cause CPU overload, so as long as we don’t use it extensively, the design uses corresponding compilation caching technology online, which has been well optimized and solved this problem. 3. Static is only for search engines and does not need to be used by users. We have very mature pseudo-static technology. There is no need to make true static, which will cause too much unnecessary trouble to users.

2. How to optimize the page


wait.


48 PHP 页面静态化2.1 Staticization of dynamic pages:


48 PHP 页面静态化

48 PHP 页面静态化
48 PHP 页面静态化
48 PHP 页面静态化
48 PHP 页面静态化Staticization of dynamic pages is not applicable to:
48 PHP 页面静态化


3. About dynamic URL address settings Static form48 PHP 页面静态化



4. Introduction to static 48 PHP 页面静态化


Partial pure static: implemented with
ajax48 PHP 页面静态化

').addClass('pre-numbering').hide(); $(this).addClass('has-numbering').parent().append($numbering); for (i = 1; i ').text(i)); }; $numbering.fadeIn(1700); }); });

The above introduces 48 PHP page staticization, including ajax and indexing. I hope it will be helpful to friends who are interested in PHP tutorials.
Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template