RewriteEngine on
# 您的web访问根目录
RewriteBase /iweb_sns
RewriteRule ^home/([0-9]+)$ home.php?h=$1 [L]

RewriteRule ^home/([0-9]+)/blog/([0-9]+)$ home.php?h=$1&app=blog&id=$2 [L]
RewriteRule ^home/([0-9]+)/photo/([0-9]+)/([0-9]+)$ home.php?h=$1&app=photo&photo_id=$2&album_id=$3 [L]

RewriteRule ^home/([0-9]+)/blog/([0-9]+)/([0-9]+)$ home.php?h=$1&app=blog&id=$2&user_id=$3 [L]
RewriteRule ^home/([0-9]+)/photo/([0-9]+)/([0-9]+)/([0-9]+)$ home.php?h=$1&app=photo&photo_id=$2&album_id=$3&user_id=$4 [L]

RewriteRule ^modules/blog/([0-9]+)$ modules.php?&app=blog&id=$1 [L]
RewriteRule ^modules/photo/([0-9]+)/([0-9]+)$ modules.php?&app=photo&photo_id=$1&album_id=$2 [L]

RewriteRule ^modules/blog/([0-9]+)/([0-9]+)$ modules.php?&app=blog&id=$1&user_id=$2 [L]
RewriteRule ^modules/photo/([0-9]+)/([0-9]+)/([0-9]+)$ modules.php?&app=photo&photo_id=$1&album_id=$2&user_id=$3 [L]
