!


.htaccess


PHP :
RewriteEngine on
RewriteBase 
/

RewriteCond %{REQUEST_URI} /one1
RewriteRule 
^[^.]*$ for_one.php [L]

RewriteCond %{REQUEST_URI} /two2
RewriteRule 
.* for_two.php [L



test.ru/one1 => for_one.php
test.ru/two2 => for_two.php


:

PHP :
RewriteEngine on
RewriteBase 
/


RewriteCond %{REQUEST_URI} /one1
RewriteRule 
^[^.]*$ for_one.php [L]

RewriteRule .* for_two.php [L


test.ru/one1 => for_two.php



[L] :

Stop the rewriting process here and don't apply any more rewrite rules. This corresponds to the Perl last command or the break command in C. Use this flag to prevent the currently rewritten URL from being rewritten further by following rules. Remember, however, that if the RewriteRule generates an internal redirect (which frequently occurs when rewriting in a per-directory context), this will reinject the request and will cause processing to be repeated starting from the first RewriteRule.

Internal Redirect - ? [R] .