busta,
I'm not sure what you're trying to do with the RewriteCond lines.
What I was saying was that, UNLESS terminated by a Last flag, each successive mod_rewrite statement is ANDed with the next one.
Example:
Code:
RewriteRule ^/?([0-9]+)/test\.php$ $1/redirect1
RewriteRule ^/?([a-z]+)/test\.php$ $1/redirect2 [L]
In this example, using digits in the first subdirectory and using letters in the second subdirectory, redirect2 will NEVER be effected because the second RewriteRule is ANDed with the first and the digits can NEVER match the letters of the second.
Using the Last flag is similar to using ; in a single line PHP statement OR using } to close a PHP block statement. PHP will only provide an error if those characters are not used while mod_rewrite will "dummy-up" and try to proceed with what it thinks you want it to do (AND all statements until it finds a Last flag).
Yes (PM).
Regards,
DK
Bookmarks