<IfModule mod_rewrite.c>
# .htaccess
# ThinkSNS
#
# 为了正常启用URL Rewrite，请将apache配置文件中“LoadModule rewrite_module modules/mod_rewrite.so”
# 前的注释去掉，并将apache的DocumentRoot开启AllowOverride
# 
# 如下所示为apache下httpd.conf的代码片段：
# <Directory "YourDocumentRoot">
#   Options Indexes FollowSymLinks ExecCGI Includes
#   AllowOverride All
#   Order allow,deny
#   Allow from all
# </Directory>
#

# 是否开启URL Rewrite.
RewriteEngine On

# 根目录名称 [注意：前后都有"/"]
# 请将下面的“/thinksns/”替换成您的根目录名称。如：
# 如果您的站点地址为：http://abc.com，那么请将“/thinksns/”替换为"/"
# 如果您的站点地址为：http://abc.com/d/e/f，那么请将“/thinksns/”替换为"/d/e/f/"


# 基本链接
RewriteRule ^/?rewrite$									public/rewrite.php

RewriteRule	^/?page/([0-9a-zA-Z_]+)\.html$				index.php?app=page&mod=Index&act=index&page=$1&%{QUERY_STRING} [L]

RewriteRule ^/?home$                                     index.php?app=public&mod=Index&act=index&%{QUERY_STRING} [L]

RewriteRule ^/?@([_a-zA-Z0-9]+)$                                     index.php?app=public&mod=Profile&act=index&uid=$1&%{QUERY_STRING} [L]

RewriteRule ^/?@([0-9]+)/Profile$                                     index.php?app=public&mod=Profile&act=data&uid=$1&%{QUERY_STRING} [L]

RewriteRule ^/?@([0-9]+)/following$                                     index.php?app=public&mod=Profile&act=following&uid=$1&%{QUERY_STRING} [L]

RewriteRule ^/?@([0-9]+)/follower$                                     index.php?app=public&mod=Profile&act=follower&uid=$1&%{QUERY_STRING} [L]

RewriteRule ^/?login$                                     index.php?app=public&mod=Passport&act=login&%{QUERY_STRING} [L]

RewriteRule ^/?register$                                     index.php?app=public&mod=Register&act=index&%{QUERY_STRING} [L]

RewriteRule ^/?activate/([0-9]+)$                                     index.php?app=public&mod=Register&act=waitForActivation&uid=$1&%{QUERY_STRING} [L]

RewriteRule ^/?review/([0-9]+)$                                     index.php?app=public&mod=Register&act=waitForAudit&uid=$1&%{QUERY_STRING} [L]

#上传头像
RewriteRule ^/?register/upload_photo$  									index.php?app=public&mod=Register&act=step2&%{QUERY_STRING} [L]
#选择职业
RewriteRule ^/?register/work_information$  									index.php?app=public&mod=Register&act=step3&%{QUERY_STRING} [L]
#选择感兴趣的人
RewriteRule ^/?register/follow_interesting$							index.php?app=public&mod=Register&act=step4&%{QUERY_STRING} [L]
#微博搜索
#RewriteRule ^/?weibo/search/([0-9]+)/(.*)$									index.php?app=public&mod=Search&t=$1&a=public&k=$2&%{QUERY_STRING} [L]
#微吧搜索
#RewriteRule ^/?weiba/search/([0-9]+)/(.*)$									index.php?app=weiba&mod=Index&act=search&type=$1&k=$2&%{QUERY_STRING} [L]

#全站动态
RewriteRule ^/?allfeed$                                     index.php?app=public&mod=Index&act=index&type=all&%{QUERY_STRING} [L]

RewriteRule ^/?my/weibo$                                     index.php?app=public&mod=Index&act=myFeed&%{QUERY_STRING} [L]

RewriteRule ^/?my/following$                                     index.php?app=public&mod=Index&act=following&%{QUERY_STRING} [L]

RewriteRule ^/?my/follower$                                     index.php?app=public&mod=Index&act=follower&%{QUERY_STRING} [L]

RewriteRule ^/?my/favorite$                                     index.php?app=public&mod=Collection&act=index&%{QUERY_STRING} [L]

RewriteRule ^/?atme$                                     index.php?app=public&mod=Mention&act=index&%{QUERY_STRING} [L]

RewriteRule ^/?comment/receive$                                     index.php?app=public&mod=Comment&act=index&type=receive&%{QUERY_STRING} [L]

RewriteRule ^/?comment/send$                                     index.php?app=public&mod=Comment&act=index&type=send&%{QUERY_STRING} [L]

RewriteRule ^/?message$                                     index.php?app=public&mod=Message&act=index&%{QUERY_STRING} [L]

RewriteRule ^/?notify$                                     index.php?app=public&mod=Message&act=notify&%{QUERY_STRING} [L]

RewriteRule ^/?message/([0-9]+)/([0-9]+)$                  index.php?app=public&mod=Message&act=detail&type=$1&id=$2&%{QUERY_STRING} [L]

RewriteRule ^/?@([0-9]+)/weibo/([0-9]+)$                  index.php?app=public&mod=Profile&act=feed&uid=$1&feed_id=$2&%{QUERY_STRING} [L]

RewriteRule ^/?setting$                                     index.php?app=public&mod=Account&act=index&%{QUERY_STRING} [L]

RewriteRule ^/?setting/upload_photo$                        index.php?app=public&mod=Account&act=avatar&%{QUERY_STRING} [L]

RewriteRule ^/?setting/domain$                                     index.php?app=public&mod=Account&act=domain&%{QUERY_STRING} [L]

RewriteRule ^/?setting/verify$                                     index.php?app=public&mod=Account&act=authenticate&%{QUERY_STRING} [L]

RewriteRule ^/?setting/privacy$                                     index.php?app=public&mod=Account&act=privacy&%{QUERY_STRING} [L]

RewriteRule ^/?setting/notify$                                     index.php?app=public&mod=Account&act=notify&%{QUERY_STRING} [L]

RewriteRule ^/?setting/blacklist$                                     index.php?app=public&mod=Account&act=blacklist&%{QUERY_STRING} [L]

RewriteRule ^/?setting/security$                                     index.php?app=public&mod=Account&act=security&%{QUERY_STRING} [L]

RewriteRule ^/?setting/bind$                                     index.php?app=public&mod=Account&act=bind&%{QUERY_STRING} [L]

#微吧
RewriteRule ^/?weiba$									index.php?app=weiba&mod=Index&act=index&%{QUERY_STRING} [L]

RewriteRule ^/?weiba/weibalist$									index.php?app=weiba&mod=Index&act=weibaList&%{QUERY_STRING} [L]

RewriteRule ^/?weiba/postlist$									index.php?app=weiba&mod=Index&act=postList&%{QUERY_STRING} [L]

#RewriteRule ^/?weiba/my/$									index.php?app=weiba&mod=Index&act=myWeiba&%{QUERY_STRING} [L]

#RewriteRule ^/?weiba/my/post$									index.php?app=weiba&mod=Index&act=myWeiba&type=myPost&%{QUERY_STRING} [L]

#RewriteRule ^/?weiba/my/reply$									index.php?app=weiba&mod=Index&act=myWeiba&type=myReply&%{QUERY_STRING} [L]

RewriteRule ^/?weiba/([0-9]+)$									index.php?app=weiba&mod=Index&act=detail&weiba_id=$1&%{QUERY_STRING} [L]

RewriteRule ^/?weiba/([0-9]+)/digest$									index.php?app=weiba&mod=Index&act=detail&weiba_id=$1&type=digest&%{QUERY_STRING} [L]

RewriteRule ^/?weiba/([0-9]+)/post$									index.php?app=weiba&mod=Index&act=post&weiba_id=$1&%{QUERY_STRING} [L]

RewriteRule ^/?weiba/([0-9]+)/edit$									index.php?app=weiba&mod=Index&act=postEdit&post_id=$1&%{QUERY_STRING} [L]

RewriteRule ^/?weiba/([0-9]+)/detail$									index.php?app=weiba&mod=Index&act=postDetail&post_id=$1&%{QUERY_STRING} [L]

RewriteRule ^/?weiba/([0-9]+)/editreply$									index.php?app=weiba&mod=Index&act=replyEdit&reply_id=$1&%{QUERY_STRING} [L]

RewriteRule ^/?weiba/([0-9]+)/manage$									index.php?app=weiba&mod=Manage&act=index&weiba_id=$1&%{QUERY_STRING} [L]

RewriteRule ^/?weiba/([0-9]+)/manage/member$									index.php?app=weiba&mod=Manage&act=member&weiba_id=$1&%{QUERY_STRING} [L]

RewriteRule ^/?weiba/([0-9]+)/manage/notify$									index.php?app=weiba&mod=Manage&act=notify&weiba_id=$1&%{QUERY_STRING} [L]

RewriteRule ^/?weiba/([0-9]+)/manage/log$									index.php?app=weiba&mod=Manage&act=log&weiba_id=$1&%{QUERY_STRING} [L]

# /page/page.html
RewriteRule ^/?topics/(.*)$				                             index.php?app=public&mod=Topic&act=index&domain=$1&%{QUERY_STRING} [L]
</IfModule>