+ -
当前位置:首页 → 问答吧 → .htaccess规则 转成nginx伪静态规则

.htaccess规则 转成nginx伪静态规则

时间:2011-06-11

来源:互联网

RewriteEngine On
RewriteBase /

RewriteRule ^info-id-([0-9]+)\.html$ info\.php\?id=$1
RewriteRule ^info-catid-([0-9]+)\.html$ info\.php\?catid=$1
RewriteRule ^info-catid-([0-9]+)-page-([0-9]+)\.html$ info\.php\?catid=$1&page=$2
RewriteRule ^info-catid-([0-9]+)-areaid-([0-9]+)-page-([0-9]+)\.html$ info\.php\?catid=$1&areaid=$2&page=$3

RewriteRule ^news\.html$ news\.php
RewriteRule ^news-id-([0-9]+)\.html$ news\.php\?id=$1
RewriteRule ^news-catid-([0-9]+)\.html$ news\.php\?catid=$1
RewriteRule ^news-catid-([0-9]+)-page-([0-9]+)\.html$ news\.php\?catid=$1&page=$2

RewriteRule ^corp\.html$ corp\.php
RewriteRule ^corp-areaid-([0-9]+)\.html$ corp\.php\?areaid=$1
RewriteRule ^corp-page-([0-9]+)\.html$ corp\.php\?page=$1
RewriteRule ^corp-catid-([0-9]+)\.html$ corp\.php\?catid=$1
RewriteRule ^corp-areaid-([0-9]+)-page-([0-9]+)\.html$ corp\.php\?areaid=$1&page=$2
RewriteRule ^corp-catid-([0-9]+)-page-([0-9]+)\.html$ corp\.php\?catid=$1&page=$2
RewriteRule ^corp-catid-([0-9]+)-areaid-([0-9]+)\.html$ corp\.php\?catid=$1&areaid=$2
RewriteRule ^corp-catid-([0-9]+)-areaid-([0-9]+)-page-([0-9]+)\.html$ corp\.php\?catid=$1&areaid=$2&page=$3

RewriteRule ^aboutus\.html$ about\.php\?part=aboutus
RewriteRule ^aboutus-id-([0-9]+)\.html$ about\.php\?part=aboutus&id=$1
RewriteRule ^announce\.html$ about\.php\?part=announce&id=$1
RewriteRule ^faq\.html$ about\.php\?part=faq
RewriteRule ^faq-id-([0-9]+)\.html$ about\.php\?part=faq&id=$1
RewriteRule ^friendlink\.html$ about\.php\?part=friendlink

RewriteRule ^space/(.+)\/$ space\.php\?user=$1
RewriteRule ^space/(.+)\/about_us.html$ space\.php\?user=$1&part=about_us
RewriteRule ^space/(.+)\/info.html$ space\.php\?user=$1&part=info
RewriteRule ^space/(.+)\/album.html$ space\.php\?user=$1&part=album
RewriteRule ^space/(.+)\/contactus.html$ space\.php\?user=$1&part=contactus
RewriteRule ^space/(.+)\/comment.html$ space\.php\?user=$1&part=comment
RewriteRule ^space/(.+)\/guestbook.html$ space\.php\?user=$1&part=guestbook
RewriteRule ^space/(.+)\/([a-z]+)-page-([0-9]+).html$ space\.php\?user=$1&part=$2&page=3
RewriteRule ^space/(.+)\/document-typeid-([0-9]+).html$ space\.php\?user=$1&part=document&typeid=$2
RewriteRule ^space/(.+)\/document-id-([0-9]+).html$ space\.php\?user=$1&part=document&id=$2

作者: songhengwu   发布时间: 2011-06-11

没有人知道吗!!!!

作者: songhengwu   发布时间: 2011-06-11