Per-directory rewrites

Topics: User Forum
Nov 10, 2009 at 8:29 AM

Does Ionics Isapi Rewrite support per-directory rewrites?

Coordinator
Nov 10, 2009 at 11:34 AM

What's a per-directory rewrite? 

If you like you can put a single wildcard rule in your ini file that rewrites any incoming URL with a given directory.  Is that what you mean?

 

Nov 10, 2009 at 3:58 PM

Hi,

I have a web site running on IIS 6 with document root like this C:\www

Working -- > C:\www ( IIRF ini + Drupal files ) at the root folder

NOT working -->  C:\www (IIRF ini )\drupal (Drupal files)

NOT working --> C:\www\drupal ( IIRF ini + Drupal files ) at sub directory

 

I think it's the same problem at http://iirf.codeplex.com/Thread/View.aspx?ThreadId=43777

 

What do you think?

 

Coordinator
Nov 11, 2009 at 7:48 AM

Here's what I think;

you must put the IIRF.ini in the top-level directory of the IIS application or IIS web site. 

If you have drupal in a lower level directory, then you can modify the rules in the IIRF.ini to apply to only URL requests for that particular directory.

Example:  this rule applies to all incoming URL requests:

RewriteRule ^/(?!index.php)(.+)$   /index.php?p1=$1

On the other hand, this rule applies to incoming URL requests with a particular URL path

RewriteRule ^/drupal/(?!index.php)(.+)$   /drupal/index.php?p1=$1

 

-Cheeso

 

Nov 11, 2009 at 5:26 PM

Thanks, Cheeso.