<p>I have an existing htaccess that works fine:</p>

<pre><code>RewriteEngine On
RewriteCond %{SCRIPT_FILENAME} !-f
RewriteCond %{SCRIPT_FILENAME} !-d
RewriteRule (.*) /default.php 
DirectoryIndex index.php /default.php
</code></pre>

<p>I wish to modify this so that all urls that start with /test/ go to /test/default.php, <strong>while keeping all other URLs with the existing /default.php</strong>.</p>

<p>Example: <a href="http://www.x.com/hello.php" rel="nofollow noreferrer">http://www.x.com/hello.php</a> -- > <a href="http://www.x.com/default.php" rel="nofollow noreferrer">http://www.x.com/default.php</a> Example: <a href="http://www.x.com/test/hello.php" rel="nofollow noreferrer">http://www.x.com/test/hello.php</a> -- > <a href="http://www.x.com/test/default.php" rel="nofollow noreferrer">http://www.x.com/test/default.php</a></p>

Put the rule for /test/ in before the rule for everything else, but give it an
```
[L]
```
flag to stop the rewrite rule processing there if it matches.