I accidentally posted this at the wrong forum.
Can't find how to move it to the right forum. Sorry about that.
I am trying to rewrite
http://localtt/israel/herzliya/photos/89 ==>
http://localtt/israel/herzliya/photos.php/89 ==>
http://localtt/photos.php?photo=89&loc1 ... 2=herzliya
Here's my .htaccess (I must use .htaccess) at the top directory:
# Protect files and directories from prying eyes.
<FilesMatch "\.(xml|inc)$">
Order deny,allow
Deny from all
</FilesMatch>
Options +FollowSymlinks -MultiViews
PHP_FLAG output_buffering on
FileETag none
<IfModule mod_expires.c>
ExpiresActive On
ExpiresDefault "access plus 300 seconds"
ExpiresByType text/html "access plus 1 day"
ExpiresByType text/css "access plus 1 month"
ExpiresByType text/javascript "access plus 1 month"
ExpiresByType application/x-javascript "access plus 1 month"
ExpiresByType image/gif "access plus 1 month"
ExpiresByType image/jpeg "access plus 1 month"
ExpiresByType image/png "access plus 1 month"
</IfModule>
<IfModule mod_rewrite.c>
RewriteEngine On
# Ignore all real files and directories after this rule.
RewriteCond %{SCRIPT_FILENAME} -f [OR]
RewriteCond %{SCRIPT_FILENAME} -d
RewriteRule .* - [L]
RewriteRule ^(.*)photos([^.].*)?$ $1photos.php$2 [NC,QSA]
# locations url and single entry
RewriteRule ^([a-z+_,-]+)/?([a-z+_,-]*)/?([a-z+_,-]*)/([a-z]+)s.php/([0-9]+)/?(\?.*)?/?$ $5s.php?$4=$5&loc1=$1&loc2=$2&loc3=$3&$6 [NC,QSA,L]
</IfModule>
after the RewriteRule (2) is matched, and rewrite, I get
add path info postfix: D:/eclipsews/trunk/tt/israel/herzliya/photos.php/89 -> D:/eclipsews/trunk/tt/israel/herzliya/photos.php/89/herzliya/photos/89
Here's my log:
127.0.0.1 - - [21/Feb/2008:15:56:18 +0200] [localtt/sid#7014f8][rid#713918/initial] (3) [per-dir D:/eclipsews/trunk/tt/] add path info postfix: D:/eclipsews/trunk/tt/israel -> D:/eclipsews/trunk/tt/israel/herzliya/photos/89
127.0.0.1 - - [21/Feb/2008:15:56:18 +0200] [localtt/sid#7014f8][rid#713918/initial] (3) [per-dir D:/eclipsews/trunk/tt/] strip per-dir prefix: D:/eclipsews/trunk/tt/israel/herzliya/photos/89 -> israel/herzliya/photos/89
127.0.0.1 - - [21/Feb/2008:15:56:18 +0200] [localtt/sid#7014f8][rid#713918/initial] (3) [per-dir D:/eclipsews/trunk/tt/] applying pattern '.*' to uri 'israel/herzliya/photos/89'
127.0.0.1 - - [21/Feb/2008:15:56:18 +0200] [localtt/sid#7014f8][rid#713918/initial] (4) RewriteCond: input='D:/eclipsews/trunk/tt/israel' pattern='-f' => not-matched
127.0.0.1 - - [21/Feb/2008:15:56:18 +0200] [localtt/sid#7014f8][rid#713918/initial] (4) RewriteCond: input='D:/eclipsews/trunk/tt/israel' pattern='-d' => not-matched
127.0.0.1 - - [21/Feb/2008:15:56:18 +0200] [localtt/sid#7014f8][rid#713918/initial] (3) [per-dir D:/eclipsews/trunk/tt/] add path info postfix: D:/eclipsews/trunk/tt/israel -> D:/eclipsews/trunk/tt/israel/herzliya/photos/89
127.0.0.1 - - [21/Feb/2008:15:56:18 +0200] [localtt/sid#7014f8][rid#713918/initial] (3) [per-dir D:/eclipsews/trunk/tt/] strip per-dir prefix: D:/eclipsews/trunk/tt/israel/herzliya/photos/89 -> israel/herzliya/photos/89
127.0.0.1 - - [21/Feb/2008:15:56:18 +0200] [localtt/sid#7014f8][rid#713918/initial] (3) [per-dir D:/eclipsews/trunk/tt/] applying pattern '^(.*)photos([^.].*)?$' to uri 'israel/herzliya/photos/89'
127.0.0.1 - - [21/Feb/2008:15:56:18 +0200] [localtt/sid#7014f8][rid#713918/initial] (2) [per-dir D:/eclipsews/trunk/tt/] rewrite israel/herzliya/photos/89 -> israel/herzliya/photos.php/89
127.0.0.1 - - [21/Feb/2008:15:56:18 +0200] [localtt/sid#7014f8][rid#713918/initial] (3) [per-dir D:/eclipsews/trunk/tt/] add per-dir prefix: israel/herzliya/photos.php/89 -> D:/eclipsews/trunk/tt/israel/herzliya/photos.php/89
127.0.0.1 - - [21/Feb/2008:15:56:18 +0200] [localtt/sid#7014f8][rid#713918/initial] (3) [per-dir D:/eclipsews/trunk/tt/] add path info postfix: D:/eclipsews/trunk/tt/israel/herzliya/photos.php/89 -> D:/eclipsews/trunk/tt/israel/herzliya/photos.php/89/herzliya/photos/89
127.0.0.1 - - [21/Feb/2008:15:56:18 +0200] [localtt/sid#7014f8][rid#713918/initial] (3) [per-dir D:/eclipsews/trunk/tt/] strip per-dir prefix: D:/eclipsews/trunk/tt/israel/herzliya/photos.php/89/herzliya/photos/89 -> israel/herzliya/photos.php/89/herzliya/photos/89
127.0.0.1 - - [21/Feb/2008:15:56:18 +0200] [localtt/sid#7014f8][rid#713918/initial] (3) [per-dir D:/eclipsews/trunk/tt/] applying pattern '^([a-z+_,-]+)/?([a-z+_,-]*)/?([a-z+_,-]*)/([a-z]+)s.php/([0-9]+)/?(\?.*)?/?$' to uri 'israel/herzliya/photos.php/89/herzliya/photos/89'
127.0.0.1 - - [21/Feb/2008:15:56:18 +0200] [localtt/sid#7014f8][rid#713918/initial] (2) [per-dir D:/eclipsews/trunk/tt/] strip document_root prefix: D:/eclipsews/trunk/tt/israel/herzliya/photos.php/89 -> /israel/herzliya/photos.php/89
127.0.0.1 - - [21/Feb/2008:15:56:18 +0200] [localtt/sid#7014f8][rid#713918/initial] (1) [per-dir D:/eclipsews/trunk/tt/] internal redirect with /israel/herzliya/photos.php/89 [INTERNAL REDIRECT]
127.0.0.1 - - [21/Feb/2008:15:56:18 +0200] [localtt/sid#7014f8][rid#71dcf0/initial/redir#1] (3) [per-dir D:/eclipsews/trunk/tt/] add path info postfix: D:/eclipsews/trunk/tt/israel -> D:/eclipsews/trunk/tt/israel/herzliya/photos.php/89
127.0.0.1 - - [21/Feb/2008:15:56:18 +0200] [localtt/sid#7014f8][rid#71dcf0/initial/redir#1] (3) [per-dir D:/eclipsews/trunk/tt/] strip per-dir prefix: D:/eclipsews/trunk/tt/israel/herzliya/photos.php/89 -> israel/herzliya/photos.php/89
127.0.0.1 - - [21/Feb/2008:15:56:18 +0200] [localtt/sid#7014f8][rid#71dcf0/initial/redir#1] (3) [per-dir D:/eclipsews/trunk/tt/] applying pattern '.*' to uri 'israel/herzliya/photos.php/89'
127.0.0.1 - - [21/Feb/2008:15:56:18 +0200] [localtt/sid#7014f8][rid#71dcf0/initial/redir#1] (4) RewriteCond: input='D:/eclipsews/trunk/tt/israel' pattern='-f' => not-matched
127.0.0.1 - - [21/Feb/2008:15:56:18 +0200] [localtt/sid#7014f8][rid#71dcf0/initial/redir#1] (4) RewriteCond: input='D:/eclipsews/trunk/tt/israel' pattern='-d' => not-matched
127.0.0.1 - - [21/Feb/2008:15:56:18 +0200] [localtt/sid#7014f8][rid#71dcf0/initial/redir#1] (3) [per-dir D:/eclipsews/trunk/tt/] add path info postfix: D:/eclipsews/trunk/tt/israel -> D:/eclipsews/trunk/tt/israel/herzliya/photos.php/89
127.0.0.1 - - [21/Feb/2008:15:56:18 +0200] [localtt/sid#7014f8][rid#71dcf0/initial/redir#1] (3) [per-dir D:/eclipsews/trunk/tt/] strip per-dir prefix: D:/eclipsews/trunk/tt/israel/herzliya/photos.php/89 -> israel/herzliya/photos.php/89
127.0.0.1 - - [21/Feb/2008:15:56:18 +0200] [localtt/sid#7014f8][rid#71dcf0/initial/redir#1] (3) [per-dir D:/eclipsews/trunk/tt/] applying pattern '^(.*)photos([^.].*)?$' to uri 'israel/herzliya/photos.php/89'
127.0.0.1 - - [21/Feb/2008:15:56:18 +0200] [localtt/sid#7014f8][rid#71dcf0/initial/redir#1] (3) [per-dir D:/eclipsews/trunk/tt/] add path info postfix: D:/eclipsews/trunk/tt/israel -> D:/eclipsews/trunk/tt/israel/herzliya/photos.php/89
127.0.0.1 - - [21/Feb/2008:15:56:18 +0200] [localtt/sid#7014f8][rid#71dcf0/initial/redir#1] (3) [per-dir D:/eclipsews/trunk/tt/] strip per-dir prefix: D:/eclipsews/trunk/tt/israel/herzliya/photos.php/89 -> israel/herzliya/photos.php/89
127.0.0.1 - - [21/Feb/2008:15:56:18 +0200] [localtt/sid#7014f8][rid#71dcf0/initial/redir#1] (3) [per-dir D:/eclipsews/trunk/tt/] applying pattern '^([a-z+_,-]+)/?([a-z+_,-]*)/?([a-z+_,-]*)/([a-z]+)s.php/([0-9]+)/?(\?.*)?/?$' to uri 'israel/herzliya/photos.php/89'
127.0.0.1 - - [21/Feb/2008:15:56:18 +0200] [localtt/sid#7014f8][rid#71dcf0/initial/redir#1] (2) [per-dir D:/eclipsews/trunk/tt/] rewrite israel/herzliya/photos.php/89 -> 89s.php?photo=89&loc1=israel&loc2=herzliya&loc3=&
127.0.0.1 - - [21/Feb/2008:15:56:18 +0200] [localtt/sid#7014f8][rid#71dcf0/initial/redir#1] (3) split uri=89s.php?photo=89&loc1=israel&loc2=herzliya&loc3=& -> uri=89s.php, args=photo=89&loc1=israel&loc2=herzliya&loc3=&
127.0.0.1 - - [21/Feb/2008:15:56:18 +0200] [localtt/sid#7014f8][rid#71dcf0/initial/redir#1] (3) [per-dir D:/eclipsews/trunk/tt/] add per-dir prefix: 89s.php -> D:/eclipsews/trunk/tt/89s.php
127.0.0.1 - - [21/Feb/2008:15:56:18 +0200] [localtt/sid#7014f8][rid#71dcf0/initial/redir#1] (2) [per-dir D:/eclipsews/trunk/tt/] strip document_root prefix: D:/eclipsews/trunk/tt/89s.php -> /89s.php
127.0.0.1 - - [21/Feb/2008:15:56:18 +0200] [localtt/sid#7014f8][rid#71dcf0/initial/redir#1] (1) [per-dir D:/eclipsews/trunk/tt/] internal redirect with /89s.php [INTERNAL REDIRECT]
127.0.0.1 - - [21/Feb/2008:15:56:18 +0200] [localtt/sid#7014f8][rid#71f220/initial/redir#2] (3) [per-dir D:/eclipsews/trunk/tt/] strip per-dir prefix: D:/eclipsews/trunk/tt/89s.php -> 89s.php
127.0.0.1 - - [21/Feb/2008:15:56:18 +0200] [localtt/sid#7014f8][rid#71f220/initial/redir#2] (3) [per-dir D:/eclipsews/trunk/tt/] applying pattern '.*' to uri '89s.php'
127.0.0.1 - - [21/Feb/2008:15:56:18 +0200] [localtt/sid#7014f8][rid#71f220/initial/redir#2] (4) RewriteCond: input='D:/eclipsews/trunk/tt/89s.php' pattern='-f' => not-matched
127.0.0.1 - - [21/Feb/2008:15:56:18 +0200] [localtt/sid#7014f8][rid#71f220/initial/redir#2] (4) RewriteCond: input='D:/eclipsews/trunk/tt/89s.php' pattern='-d' => not-matched
127.0.0.1 - - [21/Feb/2008:15:56:18 +0200] [localtt/sid#7014f8][rid#71f220/initial/redir#2] (3) [per-dir D:/eclipsews/trunk/tt/] strip per-dir prefix: D:/eclipsews/trunk/tt/89s.php -> 89s.php
127.0.0.1 - - [21/Feb/2008:15:56:18 +0200] [localtt/sid#7014f8][rid#71f220/initial/redir#2] (3) [per-dir D:/eclipsews/trunk/tt/] applying pattern '^(.*)photos([^.].*)?$' to uri '89s.php'
127.0.0.1 - - [21/Feb/2008:15:56:18 +0200] [localtt/sid#7014f8][rid#71f220/initial/redir#2] (3) [per-dir D:/eclipsews/trunk/tt/] strip per-dir prefix: D:/eclipsews/trunk/tt/89s.php -> 89s.php
127.0.0.1 - - [21/Feb/2008:15:56:18 +0200] [localtt/sid#7014f8][rid#71f220/initial/redir#2] (3) [per-dir D:/eclipsews/trunk/tt/] applying pattern '^([a-z+_,-]+)/?([a-z+_,-]*)/?([a-z+_,-]*)/([a-z]+)s.php/([0-9]+)/?(\?.*)?/?$' to uri '89s.php'
127.0.0.1 - - [21/Feb/2008:15:56:18 +0200] [localtt/sid#7014f8][rid#71f220/initial/redir#2] (1) [per-dir D:/eclipsews/trunk/tt/] pass through D:/eclipsews/trunk/tt/89s.php
If I remove the last rule, the postfix info is not added, but I need the last rule as well.
Using 'next', i.e. restarting the parsing is not acceptable as this is actually a small part of a very long original set of rules