Loading... <h4>各种web服务器搭建typecho的伪静态规则</h4> <h6>Apache</h6> <pre><code class=" line-numbers"><IfModule mod_rewrite.c> RewriteEngine On RewriteBase / RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule ^(.*)$ index.php [L,E=PATH_INFO:$1] </IfModule> </code></pre> <h6>Nginx</h6> <pre><code class=" line-numbers">if (!-e $request_filename) { rewrite ^(.*)$ /index.php$1 last; } </code></pre> <h6>IIS</h6> <pre><code class=" line-numbers">[ISAPI_Rewrite] CacheClockRate 3600 RepeatLimit 32 RewriteRule /tag/(.*) /index\.php\?tag=$1 RewriteRule /sitemap.xml /sitemap.xml [L] RewriteRule /favicon.ico /favicon.ico [L] RewriteRule /(.*).html /index.php/$1.html [L] RewriteRule /(.*)/comment /index.php/$1/comment [L] RewriteRule /category/(.*) /index.php/category/$1 [L] RewriteRule /page/(.*) /index.php/page/$1 [L] RewriteRule /search/(.*) /index.php/search/$1 [L] RewriteRule /feed/(.*) /index.php/feed/$1 [L] RewriteRule /2(.*) /index.php/2$1 [L] RewriteRule /action(.*) /index.php/action$1 [L] </code></pre> Last modification:September 12th, 2018 at 08:51 pm © 允许规范转载 Support 请博主喝一杯咖啡 ×Close Appreciate the author Sweeping payments Pay by AliPay Pay by WeChat