url重写

原创
2013/03/08 12:21
阅读数 18

RewriteEngine on
rewritecond %{http_host} ^nb-qihang.com [nc]
RewriteRule ^(.*)$ http://www.nb-qihang.com/$1 [r=301,nc]
RewriteRule ^/?index\.html$ cn/index.php
RewriteRule ^/?index\.php$ cn/zindex.php
RewriteRule ^/?about\.html$ /cn/about.php
RewriteRule ^/?plant\.html$ /cn/plant.php
RewriteRule ^/?plant-page-(\d+)\.html$ /cn/plant.php?page=$1
RewriteRule ^/?network\.html$ /cn/network.php
RewriteRule ^/?feedback\.html$ /cn/feedback.php
RewriteRule ^/?honor\.html$ /cn/honor.php
RewriteRule ^/?honor-page-(\d+)\.html$ /cn/honor.php?page=$1
RewriteRule ^/?jobs\.html$ /cn/jobs.php
RewriteRule ^/?jobs-page-(\d+)\.html$ /cn/jobs.php?page=$1
RewriteRule ^/?jobsd-jid-(\d+)\.html$ /cn/jobsd.php?jid=$1
RewriteRule ^/?order-pid-(\d+)\.html$ /cn/order.php?pid=$1
RewriteRule ^/?contact\.html$ /cn/contact.php

RewriteRule ^/?news\.html$ /cn/news.php
RewriteRule ^/?newsd-nid-(\d+)\.html$ /cn/newsd.php?nid=$1
RewriteRule ^/?en/newsd-nid-(\d+)\.html$ /en/newsd.php?nid=$1
RewriteRule ^/?news-page-(\d+)\.html$ /cn/news.php?page=$1
RewriteRule ^/?newsd-gid-(\d+)-nid-(\d+)\.html$ /cn/newsd.php?gid=$1&nid=$2

RewriteRule ^/?muju\.html$ /cn/muju.php
RewriteRule ^/?mujusd-nid-(\d+)\.html$ /cn/mujusd.php?nid=$1
RewriteRule ^/?muju-page-(\d+)\.html$ /cn/muju.php?page=$1
RewriteRule ^/?mujusd-gid-(\d+)-nid-(\d+)\.html$ /cn/mujusd.php?gid=$1&nid=$2

RewriteRule ^/?products\.html$ /cn/products.php
RewriteRule ^/?products-tid-(\d+)\.html$ /cn/products.php?tid=$1
RewriteRule ^/?productsd-pid-(\d+)\.html$ /cn/productsd.php?pid=$1
RewriteRule ^/?products-page-(\d+)\.html$ /cn/products.php?page=$1
RewriteRule ^/?products-tid-(\d+)-page-(\d+)\.html$ /cn/products.php?tid=$1&page=$2


 

展开阅读全文
打赏
0
0 收藏
分享

作者的其它热门文章

加载中
更多评论
打赏
0 评论
0 收藏
0
分享
返回顶部
顶部