url重写

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


 

你可能感兴趣的:(url重写)