能不能帮我转化一个伪静态规则呀?Apache伪静态规则转换成IIS, 40
Apache服务器,伪静态规则如下:RewriteEngineonRewriteBase/RewriteRule^index\.htmlindex.php[L]Rewri...
Apache服务器,伪静态规则如下:
RewriteEngine on
RewriteBase /
RewriteRule ^index\.html index.php [L]
RewriteRule ^index-([0-9\_]*)-(0|1)?-([0-9]*)\.html$ index.php?area_id=$1&list_mode=$2&p=$3 [L]
RewriteRule ^list_([a-z]+)-([0-9\_]*)-(0|1)?-([0-9]*)\.html$ list.php?mode=$1&area_id=$2&list_mode=$3&p=$4 [L]
RewriteRule ^article_([a-z]+)-([0-9]+)-([0-9]*)\.html$ article.php?mode=$1&id=$2&p=$3 [L]
如为Nginx,规则代码如下:
location / {
rewrite ^(.*)/index\.html$ $1/index.php last;
rewrite ^(.*)/index-([0-9\_]*)-(0|1)?-([0-9]*)\.html$ $1/index.php?area_id=$2&list_mode=$3&p=$4 last;
rewrite ^(.*)/list_([a-z]+)-([0-9\_]*)-(0|1)?-([0-9]*)\.html$ $1/list.php?mode=$2&area_id=$3&list_mode=$4&p=$5 last;
rewrite ^(.*)/article_([a-z]+)-([0-9]+)-([0-9]*)\.html$ $1/article.php?mode=$2&id=$3&p=$4 last;
}
我想改为 windows IIS 规则 高手帮帮忙啊 展开
RewriteEngine on
RewriteBase /
RewriteRule ^index\.html index.php [L]
RewriteRule ^index-([0-9\_]*)-(0|1)?-([0-9]*)\.html$ index.php?area_id=$1&list_mode=$2&p=$3 [L]
RewriteRule ^list_([a-z]+)-([0-9\_]*)-(0|1)?-([0-9]*)\.html$ list.php?mode=$1&area_id=$2&list_mode=$3&p=$4 [L]
RewriteRule ^article_([a-z]+)-([0-9]+)-([0-9]*)\.html$ article.php?mode=$1&id=$2&p=$3 [L]
如为Nginx,规则代码如下:
location / {
rewrite ^(.*)/index\.html$ $1/index.php last;
rewrite ^(.*)/index-([0-9\_]*)-(0|1)?-([0-9]*)\.html$ $1/index.php?area_id=$2&list_mode=$3&p=$4 last;
rewrite ^(.*)/list_([a-z]+)-([0-9\_]*)-(0|1)?-([0-9]*)\.html$ $1/list.php?mode=$2&area_id=$3&list_mode=$4&p=$5 last;
rewrite ^(.*)/article_([a-z]+)-([0-9]+)-([0-9]*)\.html$ $1/article.php?mode=$2&id=$3&p=$4 last;
}
我想改为 windows IIS 规则 高手帮帮忙啊 展开
1个回答
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询