本文最后更新于 2022-11-19,已超过 365 天未更新,内容可能已失效。
将html/css/javascript代码粘贴到文本框,点击压缩即可压缩代码
Nginx是目前很流行的web容器,在nginx配置文件中修改,Tengine是由淘宝网发起的Web服务器项目。它在Nginx的基础上,针对大访问量网站的需求,添加了很多高级功能和特性。
location / { try_files $uri $uri/ /index.php?$args; } rewrite /wp-admin$ $scheme://$host$uri/ permanent;
在网站根目录新建一个 htaccess.txt 文件,添加
<IfModule mod_rewrite.c> RewriteEngine On RewriteBase / RewriteRule ^index\.php$ - [L] RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule . /index.php [L] </IfModule>
IIS 环境是 Windows 主机常用的服务器环境
[ISAPI_Rewrite] # Defend your computer from some worm attacks #RewriteRule .*(?:global.asa|default\.ida|root\.exe|\.\.).* . [F,I,O] # 3600 = 1 hour CacheClockRate 3600 RepeatLimit 32 # Protect httpd.ini and httpd.parse.errors files # from accessing through HTTP # Rules to ensure that normal content gets through RewriteRule /tag/(.*) /index\.php\?tag=$1 RewriteRule /software-files/(.*) /software-files/$1 [L] RewriteRule /images/(.*) /images/$1 [L] RewriteRule /sitemap.xml /sitemap.xml [L] RewriteRule /favicon.ico /favicon.ico [L] # For file-based wordpress content (i.e. theme), admin, etc. RewriteRule /wp-(.*) /wp-$1 [L] # For normal wordpress content, via index.php RewriteRule ^/$ /index.php [L] RewriteRule /(.*) /index.php/$1 [L]
除非注明,子佩工作室 文章均为原创,转载请以链接形式标明本文地址。
![解决nginx: [emerg] mkdir() “/dev/shm/nginx-cache/wp” 的问题](https://oss.zptheme.com/wp-content/uploads/2023/06/1687188094-df5b941552926d5.png)




登录后即可发表评论
全部评论 (0)