apache下伪静态规则:
<IfModule mod_rewrite.c>
RewriteEngine on
RewriteCond %{REQUEST_URI} !^/public/
RewriteRule ^(.*)$ /public/$1 [L]
</IfModule>
IIS7下伪静态规则:
<rules>
<rule name="public" stopProcessing="true">
<match url="^(.*)$" ignoreCase="false" />
<conditions logicalGrouping="MatchAll">
<add input="{URL}" pattern="^/public/" ignoreCase="false" negate="true" />
</conditions>
<action type="Rewrite" url="/public/{R:1}" />
</rule>
</rules>
作者:孤独de巡礼
来源:CSDN
原文:https://blog.csdn.net/weixin_42740498/article/details/83095077