将isapi重写规则转换为IIS 7重写

编程入门 行业动态 更新时间:2024-10-26 02:25:41
本文介绍了将isapi重写规则转换为IIS 7重写的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

我在vBulletin论坛上使用带有vbSEO的helicon isapi重写.如果使用的是IIS 7,我看不到需要使用单独的isapi重写工具.重写规则和regex不是我的强项.如果有人可以帮助我将下面的信息转换为IIS 7 URL重写配置,我将不胜感激.

I am using helicon isapi rewrite with vbSEO on vBulletin forums. I don't see any need to be using a separate isapi rewrite tool if I'm using IIS 7. Rewrite rules and regex are not my strength. If anyone can help me convert the info below into an IIS 7 url rewrite configuration I would greatly appreciate it.

谢谢.

RewriteCond %{HTTP_HOST} .*vbdotnetforums RewriteRule ^((urllist|sitemap).*\.(xml|txt)(\.gz)?)$ vbseo_sitemap/vbseo_getsitemap.php?sitemap=$1 [L] RewriteCond %{HTTP_HOST} .*vbdotnetforums RewriteCond %{REQUEST_URI} !/(admincp/|modcp/|cron) RewriteRule ^/((archive/)?(.*\.php(/.*)?))$ /vbseo.php?vbseourl=$1 [L,QSA] RewriteCond %{HTTP_HOST} .*vbdotnetforums RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteCond %{REQUEST_FILENAME} !^/(admincp|modcp|clientscript|cpstyles|images|search\.php|api\.php)/ RewriteRule ^/(.+)$ /vbseo.php?vbseourl=$1 [L,QSA]

推荐答案

这是怎么回事:

<rewrite> <rules> <rule name="Imported Rule 1" stopProcessing="true"> <match url="^((urllist|sitemap).*\.(xml|txt)(\.gz)?)$" /> <conditions> <add input="{HTTP_HOST}" pattern=".*vbdotnetforums" /> </conditions> <action type="Rewrite" url="vbseo_sitemap/vbseo_getsitemap.php?sitemap={R:1}" appendQueryString="false" /> </rule> <rule name="Imported Rule 2" stopProcessing="true"> <match url="^((archive/)?(.*\.php(/.*)?))$" /> <conditions> <add input="{HTTP_HOST}" pattern=".*vbdotnetforums" /> <add input="{URL}" pattern="/(admincp/|modcp/|cron)" negate="true" /> </conditions> <action type="Rewrite" url="/vbseo.php?vbseourl={R:1}" appendQueryString="true" /> </rule> <rule name="Imported Rule 3" stopProcessing="true"> <match url="^(.+)$" /> <conditions> <add input="{HTTP_HOST}" pattern=".*vbdotnetforums" /> <add input="{REQUEST_FILENAME}" matchType="IsFile" negate="true" /> <add input="{REQUEST_FILENAME}" matchType="IsDirectory" negate="true" /> <add input="{REQUEST_FILENAME}" pattern="^/(admincp|modcp|clientscript|cpstyles|images|search\.php|api\.php)/" negate="true" /> </conditions> <action type="Rewrite" url="/vbseo.php?vbseourl={R:1}" appendQueryString="true" /> </rule> </rules> </rewrite>

您是否知道可以使用IIS7的管理控制台导入ISAPI_Rewrite规则(基于mod_rewrite)?

Did you know that you can import ISAPI_Rewrite rules (which are based on mod_rewrite) using IIS7's management console?

更多推荐

将isapi重写规则转换为IIS 7重写

本文发布于:2023-11-01 12:09:14,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1549296.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:重写   转换为   规则   isapi   IIS

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!