#
# httpd.ini
# ThinkSNS
# 

[ISAPI_Rewrite]

# 3600 = 1 Hour
CacheClockRate 3600

RepeatLimit 32

# 基本
RewriteRule ^(.*)/wap(?:\?(.*))?$                              	 $1/index\.php\?app=wap&$2 [L]
RewriteRule ^(.*)/admin(?:\?(.*))?$                            	 $1/index\.php\?app=admin&$2 [L]
RewriteRule ^(.*)/home(?:\?(.*))?$                               $1/index\.php\?app=home&mod=User&act=index&$2 [L]
RewriteRule ^(.*)/atme(?:\?(.*))?$                             	 $1/index\.php\?app=home&mod=User&act=atme&$2 [L]
RewriteRule ^(.*)/favorite(?:\?(.*))?$                         	 $1/index\.php\?app=home&mod=User&act=collection&$2 [L]
RewriteRule ^(.*)/comment(?:\?(.*))?$                          	 $1/index\.php\?app=home&mod=User&act=comments&$2 [L]
RewriteRule ^(.*)/findfriend(?:\?(.*))?$                       	 $1/index\.php\?app=home&mod=User&act=findfriend&$2 [L]
RewriteRule ^(.*)/login(?:\?(.*))?$                            	 $1/index\.php\?app=home&mod=Public&act=login&$2 [L]
RewriteRule ^(.*)/adminlogin(?:\?(.*))?$                       	 $1/index\.php\?app=home&mod=Public&act=adminlogin&$2 [L]
RewriteRule ^(.*)/logout(?:\?(.*))?$                           	 $1/index\.php\?app=home&mod=Public&act=logout&$2 [L]
RewriteRule ^(.*)/register(?:\?(.*))?$                         	 $1/index\.php\?app=home&mod=Public&act=register&$2 [L]
RewriteRule ^(.*)/sendPassword(?:\?(.*))?$                     	 $1/index\.php\?app=home&mod=Public&act=sendPassword&$2 [L]
RewriteRule ^(.*)/about/([0-9]+)(?:\?(.*))?$                 	 $1/index\.php\?app=home&mod=Public&act=document&id=$2&$3 [L]
RewriteRule ^(.*)/404(?:\?(.*))?$                              	 $1/index\.php\?app=home&mod=Public&act=error404&$2 [L]
RewriteRule ^(.*)/notification(?:\?(.*))?$                     	 $1/index\.php\?app=home&mod=Message&act=notify&$2 [L]
RewriteRule ^(.*)/appmessage(?:\?(.*))?$                       	 $1/index\.php\?app=home&mod=Message&act=appmessage&$2 [L]

# 微博广场
RewriteRule ^(.*)/square(?:\?(.*))?$                           	 $1/index\.php\?app=home&mod=Square&act=index&$2 [L]
RewriteRule ^(.*)/square/topic(?:\?(.*))?$                     	 $1/index\.php\?app=home&mod=Square&act=hot_topics&$2 [L]
RewriteRule ^(.*)/square/star(?:\?(.*))?$                      	 $1/index\.php\?app=home&mod=Square&act=star&$2 [L]

# 宝贝
RewriteRule ^(.*)/welcome(?:\?(.*))?$                           	 $1/index\.php\?app=home&mod=Welcome&act=index&$2 [L]
RewriteRule ^(.*)/from(?:\?(.*))?$                           	 $1/index\.php\?app=home&mod=From&act=index&$2 [L]
RewriteRule ^(.*)/boards(?:\?(.*))?$                           	 $1/index\.php\?app=home&mod=Boards&act=index&$2 [L]
RewriteRule ^(.*)/shopping(?:\?(.*))?$                           	 $1/index\.php\?app=home&mod=Shopping&act=index&$2 [L]
RewriteRule ^(.*)/video(?:\?(.*))?$                           	 $1/index\.php\?app=home&mod=Video&act=index&$2 [L]




# 私信
RewriteRule ^(.*)/message(?:\?(.*))?$                          	 $1/index\.php\?app=home&mod=Message&act=index&$2 [L]
RewriteRule ^(.*)/message/inbox(?:\?(.*))?$                    	 $1/index\.php\?app=home&mod=Message&act=inbox&$2 [L]
RewriteRule ^(.*)/message/outbox(?:\?(.*))?$                   	 $1/index\.php\?app=home&mod=Message&act=outbox&$2 [L]
RewriteRule ^(.*)/message/([0-9]+)(?:\?(.*))?$                 	 $1/index\.php\?app=home&mod=Message&act=detail&id=$2&$3 [L]

# 设置
RewriteRule ^(.*)/setting(?:\?(.*))?$                          	 $1/index\.php\?app=home&mod=Account&act=index&$2 [L]
RewriteRule ^(.*)/setting/privacy(?:\?(.*))?$                  	 $1/index\.php\?app=home&mod=Account&act=privacy&$2 [L]
RewriteRule ^(.*)/setting/domain(?:\?(.*))?$                   	 $1/index\.php\?app=home&mod=Account&act=domain&$2 [L]
RewriteRule ^(.*)/setting/security(?:\?(.*))?$                 	 $1/index\.php\?app=home&mod=Account&act=security&$2 [L]
RewriteRule ^(.*)/setting/medal(?:\?(.*))?$                    	 $1/index\.php\?app=home&mod=Account&act=medal&$2 [L]
RewriteRule ^(.*)/setting/bind(?:\?(.*))?$                     	 $1/index\.php\?app=home&mod=Account&act=bind&$2 [L]
RewriteRule ^(.*)/setting/credit(?:\?(.*))?$                   	 $1/index\.php\?app=home&mod=Account&act=credit&$2 [L]
RewriteRule ^(.*)/setting/verified(?:\?(.*))?$                   $1/index\.php\?app=home&mod=Account&act=verified&$2 [L]
RewriteRule ^(.*)/setting/invite(?:\?(.*))?$                   	 $1/index\.php\?app=home&mod=Account&act=invite&$2 [L]

# 用户空间
RewriteRule ^(.*)/space(?:\?(.*))?$                            	 $1/index\.php\?app=home&mod=Space&act=index&$2 [L]
RewriteRule ^(.*)/space/([a-zA-Z0-9]+)(?:\?(.*))?$             	 $1/index\.php\?app=home&mod=Space&act=index&uid=$2&$3 [L]
RewriteRule ^(.*)/space/([a-zA-Z0-9]+)/following(?:\?(.*))?$   	 $1/index\.php\?app=home&mod=Space&act=follow&uid=$2&type=following&$3 [L]
RewriteRule ^(.*)/space/([a-zA-Z0-9]+)/follower(?:\?(.*))?$    	 $1/index\.php\?app=home&mod=Space&act=follow&uid=$2&type=follower&$3 [L]
RewriteRule ^(.*)/space/([a-zA-Z0-9]+)/profile(?:\?(.*))?$     	 $1/index\.php\?app=home&mod=Space&act=profile&uid=$2&$3 [L]
RewriteRule ^(.*)/board/([a-zA-Z0-9]+)(?:\?(.*))?$             	 $1/index\.php\?app=home&mod=Space&act=board&uid=$2&$3 [L]

# 微博
RewriteRule ^(.*)/pins/([0-9]+)(?:\?(.*))?$                   	 $1/index\.php\?app=home&mod=Space&act=detail&id=$2&$3 [L]
RewriteRule ^(.*)/share(?:\?(.*))?$                            	 $1/index\.php\?app=home&mod=Space&act=share&$2 [L]
RewriteRule ^(.*)/tools(?:\?(.*))?$                           	 $1/index\.php\?app=home&mod=Caiji&act=tools&$2 [L]

# 搜索
RewriteRule ^(.*)/topics(?:/([^\?]*))?(?:\?(.*))?$               $1/index\.php\?app=home&mod=Usertopics&domain=$2&$3 [L]
RewriteRule ^(.*)/search(?:\?(.*))?$                           	 $1/index\.php\?app=home&mod=User&act=search&$2 [L]
RewriteRule ^(.*)/search/user(?:\?(.*))?$                      	 $1/index\.php\?app=home&mod=User&act=searchuser&$2 [L]
RewriteRule ^(.*)/search/tag(?:\?(.*))?$                       	 $1/index\.php\?app=home&mod=User&act=searchtag&$2 [L]

# 应用
RewriteRule ^(.*)/app/add(?:\?(.*))?$                          	 $1/index\.php\?app=home&mod=Index&act=addapp&$2 [L]
RewriteRule ^(.*)/app/edit(?:\?(.*))?$                         	 $1/index\.php\?app=home&mod=Index&act=editapp&$2 [L]
RewriteRule ^(.*)/app/install/([0-9]+)(?:\?(.*))?$             	 $1/index\.php\?app=home&mod=Index&act=install&app_id=$2&$3 [L]

# 日志
RewriteRule ^(.*)/app/blog(?:\?(.*))?$                         	 $1/index\.php\?app=blog&mod=Index&act=index&$2 [L]
RewriteRule ^(.*)/app/blog/lastest(?:\?(.*))?$                 	 $1/index\.php\?app=blog&mod=Index&act=news&$2 [L]
RewriteRule ^(.*)/app/blog/following(?:\?(.*))?$               	 $1/index\.php\?app=blog&mod=Index&act=followsblog&$2 [L]
RewriteRule ^(.*)/app/blog/my(?:\?(.*))?$                      	 $1/index\.php\?app=blog&mod=Index&act=my&$2 [L]
RewriteRule ^(.*)/app/blog/([0-9]+)(?:\?(.*))?$                	 $1/index\.php\?app=blog&mod=Index&act=personal&uid=$2&$3 [L]
RewriteRule ^(.*)/app/blog/detail/([0-9]+)(?:\?(.*))?$         	 $1/index\.php\?app=blog&mod=Index&act=show&id=$2&$3 [L]
# blog/Index/personal节点已存在, 所以去掉本条
# RewriteRule ^(.*)/app/blog/([0-9]+)/category/([0-9]+)(?:\?(.*))?$ $1/index\.php\?app=blog&mod=Index&act=personal&uid=$2&cateId=$3&$4 [L]
RewriteRule ^(.*)/app/blog/post(?:\?(.*))?$                    	 $1/index\.php\?app=blog&mod=Index&act=addBlog&$2 [L]
RewriteRule ^(.*)/app/blog/edit/([0-9]+)(?:\?(.*))?$           	 $1/index\.php\?app=blog&mod=Index&act=edit&id=$2&$3 [L]
RewriteRule ^(.*)/app/blog/admin(?:\?(.*))?$                   	 $1/index\.php\?app=blog&mod=Index&act=admin&$2 [L]

# 相册
RewriteRule ^(.*)/app/photo(?:\?(.*))?$                        	 $1/index\.php\?app=photo&mod=Index&act=index&$2 [L]
RewriteRule ^(.*)/app/photo/all_albums(?:\?(.*))?$             	 $1/index\.php\?app=photo&mod=Index&act=all_albums&$2 [L]
RewriteRule ^(.*)/app/photo/all_photos(?:\?(.*))?$             	 $1/index\.php\?app=photo&mod=Index&act=all_photos&$2 [L]
RewriteRule ^(.*)/app/photo/albums(?:\?(.*))?$                 	 $1/index\.php\?app=photo&mod=Index&act=albums&$2 [L]
RewriteRule ^(.*)/app/photo/photos(?:\?(.*))?$                 	 $1/index\.php\?app=photo&mod=Index&act=photos&$2 [L]
RewriteRule ^(.*)/app/photo/album/([0-9]+)(?:\?(.*))?$         	 $1/index\.php\?app=photo&mod=Index&act=album&id=$2&$3 [L]
RewriteRule ^(.*)/app/photo/photo/([0-9]+)(?:\?(.*))?$         	 $1/index\.php\?app=photo&mod=Index&act=photo&id=$2&$3 [L]
RewriteRule ^(.*)/app/photo/multi_upload(?:\?(.*))?$           	 $1/index\.php\?app=photo&mod=Upload&act=flash&$2 [L]
RewriteRule ^(.*)/app/photo/upload(?:\?(.*))?$                 	 $1/index\.php\?app=photo&mod=Upload&act=index&$2 [L]
RewriteRule ^(.*)/app/photo/edit/([0-9]+)(?:\?(.*))?$          	 $1/index\.php\?app=photo&mod=Manage&act=album_edit&id=$2&$3 [L]
RewriteRule ^(.*)/app/photo/order/([0-9]+)(?:\?(.*))?$         	 $1/index\.php\?app=photo&mod=Manage&act=album_order&id=$2&$3 [L]

# 活动
RewriteRule ^(.*)/app/event(?:\?(.*))?$            	          	 $1/index\.php\?app=event&mod=Index&act=index&$2 [L]
RewriteRule ^(.*)/app/event/events(?:\?(.*))?$		          	 $1/index\.php\?app=event&mod=Index&act=personal&$2 [L]
RewriteRule ^(.*)/app/event/post(?:\?(.*))?$		          	 $1/index\.php\?app=event&mod=Index&act=addEvent&$2 [L]
RewriteRule ^(.*)/app/event/edit/([0-9]+)(?:\?(.*))?$          	 $1/index\.php\?app=event&mod=Index&act=edit&id=$2&$3 [L]
RewriteRule ^(.*)/app/event/detail/([0-9]+)(?:\?(.*))?$       	 $1/index\.php\?app=event&mod=Index&act=eventDetail&id=$2&$3 [L]
RewriteRule ^(.*)/app/event/member/([0-9]+)(?:\?(.*))?$          $1/index\.php\?app=event&mod=Index&act=member&id=$2&$3 [L]

# 投票
RewriteRule ^(.*)/app/vote(?:\?(.*))?$  		   		         $1/index\.php\?app=vote&mod=Index&act=index&$2 [L]
RewriteRule ^(.*)/app/vote/my(?:\?(.*))?$  			          	 $1/index\.php\?app=vote&mod=Index&act=my&$2 [L]
RewriteRule ^(.*)/app/vote/([0-9]+)(?:\?(.*))?$		          	 $1/index\.php\?app=vote&mod=Index&act=personal&uid=$2&$3 [L]
RewriteRule ^(.*)/app/vote/post(?:\?(.*))?$		  	      	     $1/index\.php\?app=vote&mod=Index&act=addPoll&$2 [L]
RewriteRule ^(.*)/app/vote/detail/([0-9]+)(?:\?(.*))?$ 	         $1/index\.php\?app=vote&mod=Index&act=pollDetail&id=$2&$3 [L]

# 礼物
RewriteRule ^(.*)/app/gift(?:\?(.*))?$             	          	 $1/index\.php\?app=gift&mod=Index&act=index&$2 [L]
RewriteRule ^(.*)/app/gift/receive(?:\?(.*))?$  	 	         $1/index\.php\?app=gift&mod=Index&act=receivebox&$2 [L]
RewriteRule ^(.*)/app/gift/send(?:\?(.*))?$    	              	 $1/index\.php\?app=gift&mod=Index&act=sendbox&$2 [L]
RewriteRule ^(.*)/app/gift/([0-9]+)$     	   		          	 $1/index\.php\?app=gift&mod=Index&act=personal&uid=$2&$3 [L]

# 招贴版
RewriteRule ^(.*)/app/poster(?:\?(.*))?$                       	 $1/index\.php\?app=poster&mod=Index&act=index&$2 [L]
RewriteRule ^(.*)/app/poster/posters(?:\?(.*))?$             	 $1/index\.php\?app=poster&mod=Index&act=personal&$2 [L]
RewriteRule ^(.*)/app/poster/post(?:\?(.*))?$		             $1/index\.php\?app=poster&mod=Index&act=addPosterSort&$2 [L]
RewriteRule ^(.*)/app/poster/post/([0-9]+)(?:\?(.*))?$         	 $1/index\.php\?app=poster&mod=Index&act=addPoster&typeId=$2&$3 [L]
RewriteRule ^(.*)/app/poster/edit/([0-9]+)(?:\?(.*))?$        	 $1/index\.php\?app=poster&mod=Index&act=editPoster&id=$2&$3 [L]
RewriteRule ^(.*)/app/poster/detail/([0-9]+)(?:\?(.*))?$     	 $1/index\.php\?app=poster&mod=Index&act=posterDetail&id=$2&$3 [L]

# 群组
RewriteRule ^(.*)/app/group(?:\?(.*))?$            	          	 $1/index\.php\?app=group&mod=Index&act=index&$2 [L]
RewriteRule ^(.*)/app/group/my_post(?:\?(.*))?$       	      	 $1/index\.php\?app=group&mod=Index&act=post&$2 [L]
RewriteRule ^(.*)/app/group/replied(?:\?(.*))?$    	          	 $1/index\.php\?app=group&mod=Index&act=replied&$2 [L]
RewriteRule ^(.*)/app/group/comment(?:\?(.*))?$    	          	 $1/index\.php\?app=group&mod=Index&act=comment&$2 [L]
RewriteRule ^(.*)/app/group/atme(?:\?(.*))?$    	  	         $1/index\.php\?app=group&mod=Index&act=atme&$2 [L]
RewriteRule ^(.*)/app/group/groups(?:\?(.*))?$   	          	 $1/index\.php\?app=group&mod=SomeOne&act=index&$2 [L]
RewriteRule ^(.*)/app/group/class(?:\?(.*))?$      	          	 $1/index\.php\?app=group&mod=Index&act=find&$2 [L]
RewriteRule ^(.*)/app/group/search(?:\?(.*))?$     	          	 $1/index\.php\?app=group&mod=Index&act=search&$2 [L]
RewriteRule ^(.*)/app/group/add(?:\?(.*))?$     	  	         $1/index\.php\?app=group&mod=Index&act=add&$2 [L]
RewriteRule ^(.*)/app/group/([0-9]+)(?:\?(.*))?$   	          	 $1/index\.php\?app=group&mod=Group&act=index&gid=$2&$3 [L]
RewriteRule ^(.*)/app/group/([0-9]+)/search(?:\?(.*))?$          $1/index\.php\?app=group&mod=Group&act=search&gid=$2&$3 [L]
RewriteRule ^(.*)/app/group/([0-9]+)/detail/([0-9]+)(?:\?(.*))?$ $1/index\.php\?app=group&mod=Group&act=detail&gid=$2&id=$3&$4 [L]
RewriteRule ^(.*)/app/group/([0-9]+)/invite(?:\?(.*))?$        	 $1/index\.php\?app=group&mod=Invite&act=create&gid=$2&$3 [L]
RewriteRule ^(.*)/app/group/([0-9]+)/setting/baseinfo(?:\?(.*))?$ $1/index\.php\?app=group&mod=Manage&act=index&gid=$2&$3 [L]
RewriteRule ^(.*)/app/group/([0-9]+)/setting/privacy(?:\?(.*))?$ $1/index\.php\?app=group&mod=Manage&act=privacy&gid=$2&$3 [L]
RewriteRule ^(.*)/app/group/([0-9]+)/setting/member(?:\?(.*))?$	 $1/index\.php\?app=group&mod=Manage&act=membermanage&gid=$2&$3 [L]
RewriteRule ^(.*)/app/group/([0-9]+)/setting/announcement(?:\?(.*))?$ $1/index\.php\?app=group&mod=Manage&act=announce&gid=$2&$3 [L]
RewriteRule ^(.*)/app/group/([0-9]+)/setting/log(?:\?(.*))?$ 	 $1/index\.php\?app=group&mod=Log&act=index&gid=$2&$3 [L]
RewriteRule ^(.*)/app/group/([0-9]+)/bbs(?:\?(.*))?$         	 $1/index\.php\?app=group&mod=Topic&act=index&gid=$2&$3 [L]
RewriteRule ^(.*)/app/group/([0-9]+)/bbs/post(?:\?(.*))?$    	 $1/index\.php\?app=group&mod=Topic&act=add&gid=$2&$3 [L]
RewriteRule ^(.*)/app/group/([0-9]+)/bbs/edit/([0-9]+)(?:\?(.*))?$ $1/index\.php\?app=group&mod=Topic&act=edit&gid=$2&tid=$3&$4 [L]
RewriteRule ^(.*)/app/group(?:/([0-9]+))?/bbs_reply/edit(?:/([0-9]+))?$ $1/index\.php\?app=group&mod=Topic&act=editPost&gid=$2&pid=$3&$4 [L]
RewriteRule ^(.*)/app/group/([0-9]+)/bbs/([0-9]+)(?:\?(.*))?$	 $1/index\.php\?app=group&mod=Topic&act=topic&gid=$2&tid=$3&$4 [L]
RewriteRule ^(.*)/app/group/([0-9]+)/file(?:\?(.*))?$       	 $1/index\.php\?app=group&mod=Dir&act=index&gid=$2&$3 [L]
RewriteRule ^(.*)/app/group/([0-9]+)/file/upload(?:\?(.*))?$	 $1/index\.php\?app=group&mod=Dir&act=upload&gid=$2&$3 [L]
RewriteRule ^(.*)/app/group/([0-9]+)/member(?:\?(.*))?$     	 $1/index\.php\?app=group&mod=Member&act=index&gid=$2&$3 [L]

# 非法链接
RewriteRule ^(.*)/([a-zA-Z0-9]+)(?:\?(.*))?$                     $1/index\.php\?app=home&mod=Public&act=error404 [L]