<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.</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>

Basically, just put
```
/test/
```
in front of your expression. Also, the parentheses are unnecessary here:
```
```
RewriteRule ^/test/ /test/default.php
```
```