Change 2.0 to 3.0

ISAPI_Rewrite is Apache mod_rewrite compatible URL rewriter for Microsoft IIS
User avatar
Posts: 1
Joined: 24 Apr 2012, 11:47

Change 2.0 to 3.0

24 Apr 2012, 11:56

Hi i have this code in my actual server:

RewriteRule .*(?:global.asa|default\.ida|root\.exe|\.\.).* . [F,I,O]

RewriteRule /Articulos/([A-Za-z0-9]+)/([A-Za-z0-9]+)/([A-Za-z0-9\-]+)$ /articulo.asp\?id=$1&comunidad=$2&titulo=$3 [I,L]

RewriteRule /Contenidos/([A-Za-z0-9]+)/([A-Za-z0-9]+)/([A-Za-z0-9\-]+)$ /contenido.asp\?id=$1&comunidad=$2&titulo=$3 [I,L]

RewriteCond Host: (?!www\..)([^.]+\.[^.]+)
RewriteRule (.) http\://www.$1$2 [RP]

We purchased a new server and we will install version 3.0, but need help to adapt the code.

Thankxxx

User avatar
Posts: 1264
Joined: 07 Mar 2012, 10:16

Re: Change 2.0 to 3.0

25 Apr 2012, 05:46

Hello,

If none of the rules are related to the requests with query_strings, than it should be:

Code: Select all
RewriteEngine on
RewriteBase /

RewriteRule .*(?:global.asa|default\.ida|root\.exe|\.\.).* - [NC,F]
RewriteRule ^Articulos/([A-Za-z0-9]+)/([A-Za-z0-9]+)/([A-Za-z0-9\-]+)$ /articulo.asp\?id=$1&comunidad=$2&titulo=$3 [NC,L]
RewriteRule ^Contenidos/([A-Za-z0-9]+)/([A-Za-z0-9]+)/([A-Za-z0-9\-]+)$ /contenido.asp\?id=$1&comunidad=$2&titulo=$3 [NC,L]

RewriteCond %{HTTP:Host} (?!www\..)([^.]+\.[^.]+) [NC,L]
RewriteRule (.*) http\://www.$1$2 [NC,R=301,L]


Regards
Andrew

Return to ISAPI_Rewrite 3.0

Who is online

Users browsing this forum: No registered users and 9 guests