© ㄒiger / Posted in 程序代码 / March 7, 2014

apache 伪静态规则

RewriteEngine On

RewriteRule ^([a-zA-Z]+)\.(jpg|gif|png|wbmp)$ controller/Resizer.php?m=original&a=$1&e=$2 [L]
RewriteRule ^(icon|small|medium|square)\/([a-zA-Z]+)\.(jpg|gif|png|wbmp)$ controller/Resizer.php?m=$1&a=$2&e=$3 [L]

RewriteCond %{REQUEST_FILENAME} !-f
 RewriteRule (.*) application.php?request=$1 [L,QSA]

nginx 伪静态规则

rewrite ^/([a-zA-Z]+).(jpg|gif|png|wbmp)$ /controller/Resizer.php?m=original&a=$1&e=$2 last;
 rewrite ^/(icon|small|medium|square)/([a-zA-Z]+).(jpg|gif|png|wbmp)$ /controller/Resizer.php?m=$1&a=$2&e=$3 last;
 if (!-f $request_filename){
  set $rule_2 1$rule_2;
 }
 if ($rule_2 = "1"){
  rewrite /(.*) /application.php?request=$1 last;
 }


其他相关文章....


上一篇:VPS.NET 优惠码BIGHUG 免费 20美元
下一篇:最新日志

仅有一条评论 »

  1. 来访啦!

添加新评论 »

captcha
请输入验证码