注册 登录  
 加关注
   显示下一条  |  关闭
温馨提示!由于新浪微博认证机制调整,您的新浪微博帐号绑定已过期,请重新绑定!立即重新绑定新浪微博》  |  关闭

成长...

坚持,一定要坚持!

 
 
 

日志

 
 

nginx下安装easytalk的Rewrite规则  

2009-11-04 22:20:42|  分类: Linux |  标签: |举报 |字号 订阅

  下载LOFTER 我的照片书  |

nginx下安装easytalk的Rewrite规则:

 rewrite ^/([0-9]+)$ /index.php?uid=$1;
 rewrite ^/index$ /index.php;
 rewrite ^/browse/p.(.+)$ /browse.php?page=$1;
 rewrite ^/browse$ /browse.php;
 rewrite ^/home/(.+)/u.(.+)/p.(.+)$ /home.php?hm=$1&uid=$2&page=$3;
 rewrite ^/home/(.+)/u.(.+)$ /home.php?hm=$1&uid=$2;
 rewrite ^/home/u.(.+)$ /home.php?uid=$1;
 rewrite ^/home/(.+)$ /home.php?hm=$1;
 rewrite ^/home$ /home.php;
 rewrite ^/op/topic/(.+)/p.(.+)$ /op.php?op=topic&tid=$1&page=$2;
 rewrite ^/op/topic/(.+)$ /op.php?op=topic&tid=$1;
 rewrite ^/op/friends/u.(.+)/p.(.+)$ /op.php?op=friends&uid=$1&page=$2;
 rewrite ^/op/friends/u.(.+)$ /op.php?op=friends&uid=$1;
 rewrite ^/op/photo/u.(.+)/p.(.+)$ /op.php?op=photo&uid=$1&page=$2;
 rewrite ^/op/photo/u.(.+)$ /op.php?op=photo&uid=$1;
 rewrite ^/op/viewphoto/(.+)$ /op.php?op=viewphoto&ptid=$1;
 rewrite ^/op/viewalbum/(.+)/p.(.+)$ /op.php?op=viewalbum&alid=$1&page=$2;
 rewrite ^/op/viewalbum/(.+)$ /op.php?op=viewalbum&alid=$1;
 rewrite ^/op/share/u.(.+)$ /op.php?op=share&uid=$1;
 rewrite ^/op/sharereply/(.+)/p.(.+)$ /op.php?op=sharereply&sid=$1&page=$2;
 rewrite ^/op/sharereply/(.+)$ /op.php?op=sharereply&sid=$1;
 rewrite ^/op/sendmsg/u.(.+)$ /op.php?op=sendmsg&uid=$1;
 rewrite ^/op/view/(.+)$ /op.php?op=view&id=$1;
 rewrite ^/op/(.+)$ /op.php?op=$1;
 rewrite ^/op$ /op.php;
 rewrite ^/badge/picsign/(.+)\.jpg$ /badge/picsign.php?uid=$1;
 rewrite ^/plugin$ /plugin.php;
 rewrite ^/api/statuses/destroy$ /api/statuses/destroy.php;
 rewrite ^/api/statuses/update$ /;
 rewrite ^/api/statuses/show/([0-9]+).(xml|json)$ /api/statuses/show.php?id=$1&ext=$2;
 rewrite ^/api/statuses/public_timeline.(rss|xml|json)$ /api/statuses/public_timeline.php?ext=$1&$args;
 rewrite ^/api/statuses/user_timeline.(rss|xml|json)$ /api/statuses/user_timeline.php?ext=$1&$args;
 rewrite ^/api/statuses/follows_timeline.(rss|xml|json)$ /api/statuses/follows_timeline.php?ext=$1&$args;
 rewrite ^/api/users/followers.(xml|json)$ /api/users/followers.php?ext=$1&$args;
 rewrite ^/api/users/friends.(xml|json)$ /api/users/friends.php?ext=$1&$args;
 rewrite ^/api/users/show.(xml|json)$ /api/users/show.php?ext=$1&$args;
 rewrite ^/api/search/public_timeline.(xml|json)$ /api/search/public_timeline.php?ext=$1&$args;

 

对比Apache的Rewrite规则:

RewriteEngine On
RewriteBase /cheba

## ET
RewriteRule ^([0-9]+)$ index.php?uid=$1
RewriteRule ^index$ index.php
RewriteRule ^browse/p.(.+)$ browse.php?page=$1
RewriteRule ^browse$ browse.php
RewriteRule ^home/(.+)/u.(.+)/p.(.+)$ home.php?hm=$1&uid=$2&page=$3
RewriteRule ^home/(.+)/u.(.+)$ home.php?hm=$1&uid=$2
RewriteRule ^home/u.(.+)$ home.php?uid=$1
RewriteRule ^home/(.+)$ home.php?hm=$1
RewriteRule ^home$ home.php
RewriteRule ^op/topic/(.+)/p.(.+)$ op.php?op=topic&tid=$1&page=$2
RewriteRule ^op/topic/(.+)$ op.php?op=topic&tid=$1
RewriteRule ^op/friends/u.(.+)/p.(.+)$ op.php?op=friends&uid=$1&page=$2
RewriteRule ^op/friends/u.(.+)$ op.php?op=friends&uid=$1
RewriteRule ^op/photo/u.(.+)/p.(.+)$ op.php?op=photo&uid=$1&page=$2
RewriteRule ^op/photo/u.(.+)$ op.php?op=photo&uid=$1
RewriteRule ^op/viewphoto/(.+)$ op.php?op=viewphoto&ptid=$1
RewriteRule ^op/viewalbum/(.+)/p.(.+)$ op.php?op=viewalbum&alid=$1&page=$2
RewriteRule ^op/viewalbum/(.+)$ op.php?op=viewalbum&alid=$1
RewriteRule ^op/share/u.(.+)$ op.php?op=share&uid=$1
RewriteRule ^op/sharereply/(.+)/p.(.+)$ op.php?op=sharereply&sid=$1&page=$2
RewriteRule ^op/sharereply/(.+)$ op.php?op=sharereply&sid=$1
RewriteRule ^op/sendmsg/u.(.+)$ op.php?op=sendmsg&uid=$1
RewriteRule ^op/view/(.+)$ op.php?op=view&id=$1
RewriteRule ^op/(.+)$ op.php?op=$1
RewriteRule ^op$ op.php
RewriteRule ^badge/picsign/(.+)\.jpg$ badge/picsign.php?uid=$1
RewriteRule ^plugin$ plugin.php

## API
RewriteRule ^api/statuses/destroy$ api/statuses/destroy.php
RewriteRule ^api/statuses/update$  api/statuses/update.php
RewriteRule ^api/statuses/show/([0-9]+).(xml|json)$ api/statuses/show.php?id=$1&ext=$2
RewriteRule ^api/statuses/public_timeline.(rss|xml|json)$ api/statuses/public_timeline.php?ext=$1&%{QUERY_STRING}
RewriteRule ^api/statuses/user_timeline.(rss|xml|json)$ api/statuses/user_timeline.php?ext=$1&%{QUERY_STRING}
RewriteRule ^api/statuses/follows_timeline.(rss|xml|json)$ api/statuses/follows_timeline.php?ext=$1&%{QUERY_STRING}
RewriteRule ^api/users/followers.(xml|json)$ api/users/followers.php?ext=$1&%{QUERY_STRING}
RewriteRule ^api/users/friends.(xml|json)$ api/users/friends.php?ext=$1&%{QUERY_STRING}
RewriteRule ^api/users/show.(xml|json)$ api/users/show.php?ext=$1&%{QUERY_STRING}
RewriteRule ^api/search/public_timeline.(xml|json)$ api/search/public_timeline.php?ext=$1&%{QUERY_STRING}


 

  评论这张
 
阅读(1106)| 评论(0)
推荐 转载

历史上的今天

评论

<#--最新日志,群博日志--> <#--推荐日志--> <#--引用记录--> <#--博主推荐--> <#--随机阅读--> <#--首页推荐--> <#--历史上的今天--> <#--被推荐日志--> <#--上一篇,下一篇--> <#-- 热度 --> <#-- 网易新闻广告 --> <#--右边模块结构--> <#--评论模块结构--> <#--引用模块结构--> <#--博主发起的投票-->
 
 
 
 
 
 
 
 
 
 
 
 
 
 

页脚

网易公司版权所有 ©1997-2017