home page Site building tutorial Zblog website establishment text

How to write pseudo static rules for the establishment of Zblogphp secondary directory

If your Z-BlogPHP site is installed in the secondary directory, you need to use pseudo static technology to optimize the site URL and improve the efficiency of search engine spiders. The following is an example of the pseudo static rules of nginx: # Subdirectory rules should be placed first; location /sub/ { if (-f $request_filename/index.html) {  ...

If your Z-BlogPHP site is installed in the secondary directory, you need to use the pseudo static technology to optimize the site URL and improve the Search Engines Spider capture efficiency. The following is an example of the pseudo static rules of nginx:

 #Subdirectory rules should be in front; location /sub/ {       if (-f $request_filename/index. html ) {             rewrite (.*) $1/index.html break;        }       if (-f $request_filename/index.php) {             rewrite (.*) $1/index.php;        }       if (!-f $request_filename) {             rewrite (.*) /sub/index.php;        } } #Root directory rule location/{     if (-f $request_filename/index.html) {             rewrite (.*) $1/index.html break;        }       if (-f $request_filename/index.php) {             rewrite (.*) $1/index.php;        }       if (!-f $request_filename) {             rewrite (.*) /index.php;        } }
Reward
poster

Statement: Some of the resources on this site are original works on the site, and some are publicly shared and collated based on the Internet. The copyright belongs to the original author.
If it infringes your rights, please contact our website, and we will deal with it as soon as possible. Thank you. Please indicate the source of the transfer

Link to this article: https://www.umtheme.com/zblog/224.html

Related recommendations

 The list of zblog user-defined categories is based on the number of views, comments, update time ID or Author Sort

The list of zblog user-defined categories is based on the number of views, comments, update time ID or Author Sort

ZBLOG provides rich interfaces to facilitate the personalized customization of webmasters, so it is easy to reorder articles. For example, it may be necessary to adjust the default sorting of the system during the development and production process (the latest one is first), so that the list of articles under a certain category on its website is based on the specified (browse volume
Zblog website establishment 2022.10.16 zero three thousand and one
Comment List
 Wang Guangwei's Blog
Now the server panel seems to have this function
2023-05-04 11:09:12 reply

Thank you for your support