#ErrorDocument 404 /index.php?m=error
<Files *.tpl>
Order Allow,Deny    
Deny from all
</Files>
RewriteEngine on
RewriteBase /
# Allow any files or directories that exist to be displayed directly
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d

RewriteRule ^index.html$				 /index.php [L]
RewriteRule ^([a-zA-Z0-9_]+)\.html$			 /index.php?m=$1 [L]
RewriteRule ^weather-([0-9]+)-([0-9]+)\.html$		 /index.php\?m=weather&cityid=$1&xid=$2 [L]

RewriteRule ^news-c([0-9]+)-([0-9]+)\.html$		 /index.php\?m=news&class_id=$1&page=$2 [L]
RewriteRule ^news-c([0-9]+)\.html$			 /index.php\?m=news&class_id=$1 [L]
RewriteRule ^news-([0-9]+)\.html$			 /index.php\?m=news&page=$1 [L]
RewriteRule ^newsinfo-([0-9]+)\.html$			 /index.php\?m=newsinfo&aid=$1 [L]

RewriteRule ^liansuo-([0-9]+)-([0-9]+)\.html$		 /index.php\?m=liansuohotel&cityid=$1&chain_id=$2 [L]
RewriteRule ^liansuo-([a-zA-Z_]+)-([0-9]+)\.html$	 /index.php\?m=liansuohotel&$1=$2 [L]

RewriteRule ^city-([0-9]+)\.html$			 /index.php\?m=city&cityid=$1 [L]

RewriteRule ^hotel-([0-9]+)-([0-9]+)\.html$		 /index.php\?m=hotelinfo&cityid=$1&hotel_id=$2 [L]
RewriteRule ^hotel-([0-9]+)\.html$			 /index.php\?m=hotelinfo&hotel_id=$1 [L]
RewriteRule ^(hotelmap|hotelcomment|hotelnearby|hotelpicture|hotelquestion|hotellable)-([0-9]+)\.html$	/index.php\?m=$1&hotel_id=$2 [L]

RewriteRule ^(comment|question|weather|searchlist)-([0-9]+)-([0-9]+)\.html$	 /index.php\?m=$1&cityid=$2&page=$3 [L]
RewriteRule ^hotellist-([0-9]+)\.html?([\w%]*)$		 /index.php\?m=hotellist&cityid=$1&$2 [QSA,L]
RewriteRule ^(comment|question|weather|map|hotellist|searchlist|member|city)-([0-9]+)\.html$	 /index.php\?m=$1&cityid=$2 [L]

RewriteRule ^(comment|question)-p([0-9]+)-([0-9]+)\.html$	 /index.php\?m=$1&pid=$2&cityid=$3 [L]

RewriteRule ^lable-cityid([0-9]+)-([0-9]+)-([0-9]+)\.html$	/index.php\?m=lable&cityid=$1&classid=$2&page=$3 [L]
RewriteRule ^lable-(pid|cityid)([0-9]+)-([0-9]*)\.html$	        /index.php\?m=lable&$1=$2&classid=$3 [L]
RewriteRule ^lable-([0-9]+)-([0-9]+)\.html$	                /index.php\?m=lable&pid=$1&cityid=$2 [L]
RewriteRule ^lable-([0-9]+)\.html$				/index.php\?m=lable&classid=$1 [L]
RewriteRule ^teamsinfo-([0-9]+)\.html$				/index.php\?m=teamsinfo&id=$1 [L]
RewriteRule ^teams-city-([0-9]+)\.html$			        /index.php\?m=teams&cityid=$1 [L]

