nginx下的伪静态规则实现方式:
location / {
if (!-e $request_filename){
rewrite ^(.*)$ /index.php?s=$1 last; break;
}
if ( $http_user_agent ~* "(Android|iPhone|Windows Phone|UC|Kindle)" ){
rewrite ^/(.*)$ http://m.80.cn$uri redirect;
}
}
对应的apache伪静态规则实现方式:
<IfModule mod_rewrite.c>
Options +FollowSymlinks -Multiviews
RewriteEngine on
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^(.*)$ index.php?/$1 [QSA,PT,L]
RewriteCond %{HTTP_USER_AGENT} ^.*(Android|iPhone|Windows Phone|UC|Kindle).* [NC]
RewriteRule ^(.*)$ http://m.80.cn?/$1 [L,R=302]
</IfModule>
最近使用thinkphp6获取参数会附加上链接路径,造成插入数据报错Options +FollowSymlinks -MultiviewsRewriteEngine onRewriteCond %{R...
apache实现方式: Options +FollowSymlinks -Multiviews RewriteEngine On RewriteRule upload/(.*).(php)$ - [...
Apache解决虚拟主机无法指定绑定Public目录伪静态设置方法
下面实现的方式是非443端口将直接跳转至https,Apache伪静态规则实现方式如下