real 发表于 2024-8-30 10:57:03

苹果cms10伪静态规则大全

很多适合,出于SEO目的,我们需要对URL伪静态,以下是苹果cms10各个平台下的伪静态规则:1、Windows平台下
iis6.x下使用httpd.ini规则
#3600 = 1 hourCacheClockRate 3600
RepeatLimit 32RewriteRule (.*)$ /index.php?s=$1 2、Windows平台下
iis7.x下使用web.config规则<?xml version="1.0" encoding="UTF-8"?>
<configuration>
<system.webServer>
<rewrite>
<rules>
<rule name="OrgPage" stopProcessing="true">
<match url="^(.*)$" />
<conditions logicalGrouping="MatchAll">
<add input="{HTTP_HOST}" pattern="^(.*)$" />
<add input="{REQUEST_FILENAME}" matchType="IsFile" negate="true" />
<add input="{REQUEST_FILENAME}" matchType="IsDirectory" negate="true" />
</conditions>
<action type="Rewrite" url="index.php/{R:1}" />
</rule>
</rules>
</rewrite>
</system.webServer>
</configuration>3、Linux平台下
apache下使用.htaccess规则<IfModule mod_rewrite.c>
Options +FollowSymlinks -Multiviews
RewriteEngine onRewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^(.*)$ index.php?/$1
</IfModule>4、Linux平台下
nginx下使用maccms.conf规则location / {
if (!-e $request_filename) {
rewrite ^/index.php(.*)$ /index.php?s=$1 last;
rewrite ^/admin.php(.*)$ /admin.php?s=$1 last;
rewrite ^/api.php(.*)$ /api.php?s=$1 last;
rewrite ^(.*)$ /index.php?s=$1 last;
break;
}
}
页: [1]
查看完整版本: 苹果cms10伪静态规则大全