0

I have a Modx htaccess file which needs to be rewritten from mod_rewrite to isapi_rewrite 2.

Can someone please help me? The following lines need to be changed for isapi_rewrite 2:

Options +FollowSymlinks
RewriteEngine On
RewriteBase /

RewriteCond %{HTTP_USER_AGENT} ^.*internal\ dummy\ connection.*$ [NC]
RewriteRule .* - [F,L]

RewriteRule ^(manager|assets) - [L]

RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php?q=$1 [L,QSA]

Many thanks.

Skatox
  • 4,237
  • 12
  • 42
  • 47
Ty.
  • 1
  • Have you tried it? ISAPI Rewrite uses a very similar syntax to mod_rewrite. I don't believe Options, RewriteEngine or RewriteBase are supported, however, but I could be wrong. There is a similar property to RewriteBase - UriMatchPrefix, but RewriteEngine is not mentioned in the documentation. – Andy Shellam Mar 19 '10 at 12:11

1 Answers1

1

I would strongly recommend using ISAPI_Rewrite v3 as it has 99% mod_rewrite compatible syntax (from the above config only Options won't work) while ISAPI_Rewrite v2 doesn't support "RewriteCond %{REQUEST_FILENAME} !-f" and some other directives.

Also if you are on IIS 7 (7.5) you may use Helicon Ape which implements 30+ Apache modules (including mod_rewrite) on Windows systems. Ape will support the above config as is, without any modifications.

TonyCool
  • 1,004
  • 1
  • 6
  • 5
  • Helicon Ape can also be installed on IIS6 on windows server 2003 http://helicontech.blogspot.com/2009/03/using-helicon-ape-under-iis6-windows.html – Dizzy Bryan High Jul 04 '11 at 03:01