Static how to achieve? How to achieve pseudo-static?

1, static refers to the static pages, that generate static files tangible, that does not need to query the database can obtain data directly from a file, it refers to the true static.
There are two main implementations: one is we have time to add the information generated in the storage of static files, also known as template replacement technology. One is a user when visiting our pages to determine whether there is a corresponding cache file exists, if there is a cache studying, attending the database does not exist, while generating cache files.

 

2, pseudo-static not static in the true sense, the reason for the use of pseudo-static, mainly for SEO promotion, Search Engine difficult to obtain dynamic document, is not conducive to the promotion of the site. Internship principle is based on Apache or Nginx rewrite wit's
mainly in two ways: one is the pseudo-static configuration directly in the virtual machine's configuration location, this modification is completed after each need to restart the web server. Another uses a distributed, can be created on the root directory of the site's .htaccess file, configure rewrite rules in which to achieve pseudo-static, this does not need to rewrite every restart web server, and the structure relatively clear.

Published 83 original articles · won praise 54 · views 6118

Guess you like

Origin blog.csdn.net/qq_43162613/article/details/104168067