阿洋发卡程序配置伪静态

/ 0评 / 0

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>

评论已关闭。