Take the 2-minute tour ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

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.

share|improve this question

4 Answers 4

up vote 2 down vote accepted

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.

share|improve this answer

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]
share|improve this answer

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]
share|improve this answer
    
RedirectRule is the new syntax. RewriteRule with [R] was the old syntax. –  Cheeso Jul 15 '09 at 13:01

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

RewriteRule have problems with dash.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.