自动加WWW 301跳转等配置文件

RewriteEngine on
RewriteCond %{HTTP_HOST} ^yang.com [NC]
RewriteRule ^(.*)$ http://www.yang.com/$1 [L,R=301]
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^(.*)$ index.php/$1 [L]

# apache ,iis 伪静态规则
RewriteRule ^(.*)/goods-([0-9]+)(-?)([0-9]*).html$ $1/goods/index/goods_id/$2/store_id/$4
RewriteRule ^(.*)/groupbuy-([0-9]+)-([0-9]+).html$ $1/show_groupbuy/groupbuy_detail/group_id/$2/id/$3
RewriteRule ^(.*)/article-([0-9]+).html$ $1/article/index/article_id/$2
RewriteRule ^(.*)/store-([0-9]+).html$ $1/show_store/index/id/$2
RewriteRule ^(.*)/store-([0-9]+)-([0-9]+).html$ $1/show_store/index/id/$2/mfid/$3
RewriteRule ^(.*)/activity-([0-9]+)-([0-9]*).html$ $1/activity/index/activity_id/$2/nav_id/$3
RewriteRule ^(.*)/store_nav-([0-9]+)-([0-9]+).html$ $1/show_store/index/id/$2/article/$3
RewriteRule ^(.*)/document-([a-zA-Z_]+).html$ $1/document/index/code/$2
RewriteRule ^(.*)/coupon_info-([0-9]+)-([0-9]+).html$ $1/coupon_store/detail/coupon_id/$2/id/$3
posted @ 2016-11-25 10:01  Newman·Li  阅读(435)  评论(0编辑  收藏  举报