2013-11-18 4 views
0

Я использую helicon isapi переписать с vbSEO на форумах по форуму. Я не вижу необходимости использовать отдельный инструмент перезаписи isapi, если я использую IIS 7. Переписать правила и регулярное выражение не моя сила. Если кто-то может помочь мне преобразовать информацию ниже в конфигурацию перезаписи URL-адреса IIS 7, я бы очень признателен ей.Преобразование правил перезаписи isapi в IIS 7 rewrite

Заранее спасибо.

RewriteCond %{HTTP_HOST} .*vbdotnetforums.com 
RewriteRule ^((urllist|sitemap).*\.(xml|txt)(\.gz)?)$ vbseo_sitemap/vbseo_getsitemap.php?sitemap=$1 [L] 

RewriteCond %{HTTP_HOST} .*vbdotnetforums.com 
RewriteCond %{REQUEST_URI} !/(admincp/|modcp/|cron) 
RewriteRule ^/((archive/)?(.*\.php(/.*)?))$ /vbseo.php?vbseourl=$1 [L,QSA] 

RewriteCond %{HTTP_HOST} .*vbdotnetforums.com 
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] 

ответ

1

Как об этом:

<rewrite> 
    <rules> 
    <rule name="Imported Rule 1" stopProcessing="true"> 
     <match url="^((urllist|sitemap).*\.(xml|txt)(\.gz)?)$" /> 
     <conditions> 
     <add input="{HTTP_HOST}" pattern=".*vbdotnetforums.com" /> 
     </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.com" /> 
     <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.com" /> 
     <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> 

Знаете ли вы, что вы можете импортировать правила Isapi_Rewrite (которые основаны на mod_rewrite) с помощью консоли управления IIS7 в?

enter image description here

+0

Импортировано отлично! Спасибо! – Neal