What is pseudo static? First of all, we need to understand what a static page is. For example, we uploaded a test.html Web page file, we can access //hongchengtech.cn/test.html To browse it, this link can be called a static link.
So we can know that static web pages have real file paths. At the same time, using static files is also relatively friendly to search engines, because they are fast and stable to load. However, the obvious defect of static web pages is that it is not convenient to update the content wordpress Other commonly used frameworks do not support generating pure static files by default Pseudo static 。
Pseudo static means that the links displayed statically are preserved while dynamic script files are used. The above example is also used. At this time, we upload a test.php file in the root directory. Through the setting of pseudo static rules, you can also use the //hongchengtech.cn/test.html To access it, this is pseudo static.
Pseudo static rules of WordPress
location / { try_files $uri $uri/ /index.php?$ args; } rewrite /wp-admin$ $scheme://$host$uri/ permanent;
# BEGIN WordPress <IfModule mod_rewrite.c> RewriteEngine On RewriteBase / RewriteRule ^index.php$ - [L] RewriteCond %{REQUEST_FILENAME} !- f RewriteCond %{REQUEST_FILENAME} !- d RewriteRule . / index.php [L] </IfModule> # END WordPress