« Previous Next »

Thread: Change code from Apache to Isapi rewrite

Last post 10-27-2008 1:09 PM by ruslany. 1 replies.

Average Rating Rate It (5)

RSS

Page 1 of 1 (2 items)

Sort Posts:

  • 10-23-2008, 10:54 AM

    Change code from Apache to Isapi rewrite

    Currently I have a site running on a linux sever at which rewriting is in effect:

    .htaccess:
    Options +FollowSymLinks
    RewriteEngine On
    RewriteBase /
    RewriteCond %{HTTP_HOST} !^www\.example\.com$
    RewriteRule ^(.*)$ http://www dot example dot com/$1 [R=301,L]
    RewriteCond %{DOCUMENT_ROOT}/$1.php -f
    RewriteRule ^(.*[^/])/?$ /$1.php [QSA,L]
    RewriteRule ^([^/]+)/([^/]+)/([^/]+)/$ product.php?categorie=$1&subcategorie=$2&slug=$3 [L]


    RewriteCond %{HTTP_HOST} !^www\.example\.com$
    RewriteRule ^(.*)$ http://www dot example dot com/$1 [R=301,L]

    - This makes sure that the URL always starts with "http://www."


    RewriteCond %{DOCUMENT_ROOT}/$1.php -f
    RewriteRule ^(.*[^/])/?$ /$1.php [QSA,L]

    - This enables me to link to mysite.com/anypage/ instead of mysite.com/anypage.php

    RewriteRule ^([^/]+)/([^/]+)/([^/]+)/$ product.php?categorie=$1&subcategorie=$2&slug=$3 [L]

    -this enables me to link to: mysite.com/XXX/YYY/ZZZ/
    instead of: mysite.com/product.php?categorie=XXX&subcategorie=YYY&slug=ZZZ

    Could you guyz help me get this done for a windows server? I have absolutely no knowledge of these .htaccess codes, so if you can help, please be very exact

    Many thanks!

  • 10-27-2008, 1:09 PM In reply to

    • ruslany
    • Top 25 Contributor
    • Joined on 07-01-2007, 3:38 PM
    • Redmond, WA
    • Posts 661

    Re: Change code from Apache to Isapi rewrite

    ISAPI_Rewrite rules syntax is compatible with apache, so these rules should just work. If you use Microsoft URL rewrite module then you can import those rules as described here.

    http://ruslany.net
Page 1 of 1 (2 items)
Microsoft Communities