1.Apache用户无需配置伪静态
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteRule ^share_(.*)\.html$ share.php?gid=$1[NC]
</IfModule>
2.nginx规则
rewrite ^/share_(.*)\.html$ /share.php?gid=$1[NC];
3.IIS
<?xml version="1.0" encoding="UTF-8"?>
<configuration>
<system.webServer>
<rewrite>
<rules>
<clear />
<rule name="tool.apizl.com rewriteTools2" patternSyntax="ECMAScript" stopProcessing="false">
<match url="^share_(.*)\.html" ignoreCase="false" />
<conditions logicalGrouping="MatchAll" trackAllCaptures="false" />
<action type="Rewrite" url="share.php?gid={R:1}[NC]" appendQueryString="false" />
</rule>
</rules>
</rewrite>
<httpErrors>
</httpErrors>
</system.webServer>
</configuration>
© 版权声明
文章来源于网络,仅供参考与学习,如有侵权或违规请联系本站站长删除。
THE END
喜欢就支持以下吧