时光静好,与君语;细水流年,与君同;繁华落尽,与君老……
🌐 Paulblog 📅 2008 — 2026

iCMS通用rewrite伪静态规则

✍ 作者 gbl 📅 2020-07-14 📂 👁 372 阅读

nginx

location / {   index  index.html index.htm index.php;   try_files $uri $uri/ /rewrite.php?$args;}

apache

RewriteEngine onRewriteBase /RewriteCond %{REQUEST_FILENAME} !-fRewriteCond %{REQUEST_FILENAME} !-dRewriteRule . rewrite.php [L]

IIS

<?xml version="1.0" encoding="UTF-8"?><configuration><system.webServer><rewrite><rules><rule name="ICMS" stopProcessing="true"><match url="^(.)$" ignoreCase="false" /><conditions logicalGrouping="MatchAll"><add input="{HTTP_HOST}" pattern="^(.)$" /><add input="{REQUEST_FILENAME}" matchType="IsFile" ignoreCase="false" negate="true" /><add input="{REQUEST_FILENAME}" matchType="IsDirectory" ignoreCase="false" negate="true" /></conditions><action type="Rewrite" url="rewrite.php" /></rule></rules></rewrite></system.webServer></configuration>

暂无标签

评论

暂无评论...
验证码 换一张
取 消