伪静态配置
价格标签目的:配备应用程序伪静止后URL中国上将不会是指兼容机制的问号,一个详细地址很美观,也以便精准投放优化提升。适于版:2.X 、3.X1、IIS7+环境(IIS6的环境自行百度):
1)安转rewrite部件,若是 运用前景常见前景商设置已安转;2)到后台管理选配性能指标中揭开伪静态数据电源开关;3)在网点导航组建web.config系统文件(可到源码包rewrite导航下拷入規則),規則介绍如下所述:
<?xml version="1.0" encoding="UTF-8"?>
<configuration>
<system.webServer>
<rewrite>
<rules>
<rule name="reIndex" stopProcessing="true">
<match url="^(.*)$" ignoreCase="true" />
<conditions logicalGrouping="MatchAll">
<add input="{REQUEST_FILENAME}" matchType="IsDirectory" negate="true" />
<add input="{REQUEST_FILENAME}" matchType="IsFile" negate="true" />
</conditions>
<action type="Rewrite" url="index.php?p={R:1}" appendQueryString="true" />
</rule>
</rules>
</rewrite>
</system.webServer>
</configuration>
2、Apache环境
1)启闭Apache重写传感器,具体情况请百度手机,假如应用空间一样空间商锁定以经启闭;2)到后台界面搭配产品参数中上线伪动态控制开关;3)在公交线路压缩文件目次加入.htaccess压缩文件(可到源码包rewrite压缩文件目次下副本的的规则),的的规则内部有以下:
<IfModule mod_rewrite.c>
Options +FollowSymlinks
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^(.*)$ index.php?p=$1 [QSA,PT,L]
</IfModule>
3、Nginx环境
1、到电脑端系统配置参数表中开始伪静止;2、在nginx虚拟现实游戏服务器主机location硬件配置中获取标准,标准下述:
location / {
if (!-e $request_filename){
rewrite ^/(.*)$ /index.php?p=$1 last;
}
}
重视:Nginx中若是 ??康悴渴鸢才旁?级考试文件名,请各自改造重写游戏规则, 如:2级考试文件名为test则:rewrite ^/test/(.*)$ /test/index.php?p=$1 last;