文章最后更新时间:2025-11-18 00:00:00,由管理员负责审核发布,若内容或图片失效,请留言反馈!
很多适合,出于SEO目的,我们需要对URL伪静态,以下是苹果cms10各个平台下的伪静态规则:
1、Windows平台下
iis6.x下使用httpd.ini规则
iis6.x下使用httpd.ini规则
[ISAPI_Rewrite]
#3600 = 1 hour
#3600 = 1 hour
CacheClockRate 3600
RepeatLimit 32
RepeatLimit 32
RewriteRule (.*)$ /index.php?s=$1 [I]
2、Windows平台下
iis7.x下使用web.config规则
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>
<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规则
apache下使用.htaccess规则
<IfModule mod_rewrite.c>
Options +FollowSymlinks -Multiviews
RewriteEngine on
Options +FollowSymlinks -Multiviews
RewriteEngine on
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^(.*)$ index.php?/$1 [QSA,PT,L]
</IfModule>
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^(.*)$ index.php?/$1 [QSA,PT,L]
</IfModule>
4、Linux平台下
nginx下使用maccms.conf规则
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;
}
}
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;
}
}
上述,苹果cms10伪静态规则源文件,下载地址:http://down.11dmh.com/weijingtaiguize.rar
如果你不清楚伪静态规则,如何应用在苹果cms10系统配置,点击这里查看苹果cms10伪静态配置教程
文章版权声明:除非注明,否则均为苹果CMS模板站原创文章,转载或复制请以超链接形式并注明出处。




发表评论