3

First of all my setup is a VPS running Windows 2003 Server with multiple domains on it IIS 6, Plesk

IsapiRewrite4.ini

RewriteLogLevel 3

RewriteCond %{HTTP_HOST} ^mydomain.com$
RewriteRule ^/(.*)$        http://www.mydomain.com/$1  [R]

This is one of their basic examples. Ionic is installed and setup proper because if I use another rule (a simpler one ... like the one following) it works instant

# IsapiRewrite4.ini
#

RewriteLogLevel 3

#
# This ini file illustrates the use of a redirect rule. 
# Any incoming URL that starts with an uppercase W
# will be redirected to the specified server.

RewriteRule ^/(W.*)$  http://server.dyndns.org:7070/$1   [R]

This one works in the TestDriver tool and none of them gives any error or warnings in TestParse tool, but it doesn't do a thing on the webserver... The fact that one rule works means that the isapi module works. I am using the last version.

RedirectRule http://mydomain.com/someplace/somefile.html http://www.mydomain.com/howto/someplace/anotherfile.html  [I,L]

Both examples were taken from http://iirf.codeplex.com/Wiki/View.aspx?title=Redirection&referringTitle=Home So my IsapiRewrite4.ini needs to do this two tasks: auto transform and redirection for a number of urls. Can you help out.. I really don't know what I'm doing wrong.

4 Answers 4

2

RedirectRule is the new syntax. The old Syntax for 301 or 302 redirects was RewriteRule with a [R] flag, but it got to be very confusing, so it was changed. With the current version of IIRF, to do a redirect, you use a RedirectRule directive.


NB:
As of IIRF v2.1.1.5, the RewriteRule syntax with the [R] flag is once again supported, for compatibility with mod_rewrite.

1

Well I've managed to make it work.. I've had some security permission issues with the Ionic filter .dll file

First I've used RewriteRule, but after testing it with TestParser.exe I've changed it to RedirectRule. Anyways this is what I'm using now and it works ok:

RedirectRule ^/features/sepia.html$ http://www.mywebsitename.com/howto/add-effect/sepia.html [R=301]
0

What happens if you try to use the RewriteRule keyword with the "R" flag (remote redirects) instead of "RedirectRule":

 RewriteRule http://mydomain.com/someplace/somefile.html http://www.mydomain.com/howto/someplace/anotherfile.html  [R,I,L]
1
  • RedirectRule is the new syntax. RewriteRule with [R] was the old syntax.
    – Cheeso
    Jul 15, 2009 at 13:01
0

RedirectRule works well if the URL has dash (-) character. e.g. /vitamin-d/, /vitamin-d/index.htm

RewriteRule have problems with dash.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .