Apache mod_rewrite to IIRF

Topics: User Forum
Sep 20, 2006 at 10:43 PM
How do I convert the following apache mod_rewrite config to IIRF config:

Options +FollowSymLinks
RewriteEngine on
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule .* /index.php L

Rewrite Rule works fine, but I can't seem to figure out a way to forward my querystrings to index.php file.

In my index.php script, i will check for $x = $_SERVER'REQUEST_URI' and take actions depending upon the user input. For example: http://www.mydomain.com/a/b/c/d/e/f
in index.php i will get /a/b/c/d/e/f in $x variable.

Sep 25, 2006 at 10:14 PM
  1. ============================================
  2. This rule shows chaining of RewriteCond's.
  1. The first RewriteCond checks the HTTP_URL. if it ends in
  2. .foo, .htm, .php or .html, then it evaluates to TRUE.
  1. As per the description in the IIRF doc, successive RewriteCond
  2. statements are chained with a logical AND.
  1. Therefore, if the first RewriteCond evaluates to TRUE, then
  2. the 2nd will also be evaluated. The second statement tests
  3. whether the REWUEST_FILENAME is a file - actually in english
  4. the logical statement is "is the REQUEST_FILENAME NOT a file?"
  1. And the 3rd RewriteCond asks "Is the REQUEST_FILENAME NOT a
  2. directory?"
  1. In summary, then, the chain of RewriteCond directives
  2. evaluates to TRUE when, the URL includes the given suffix, and
  3. the REQUEST_FILENAME is neither a file nor a directory (file
  4. or directory does not exist). In that case, the RewriteRule is
  5. applied.
  1. ============================================

RewriteCond %{HTTP_URL} (/|\.foo|\.htm|\.php|\.html|/^.*)$ I
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^.*$ /index.php U,I,L

There is no "Follow symlinks" option.