Using preg_replace To Change index.php To test
<p>In my forum urls, there is "index.php" in it everywhere. I want to replace it with "test". In my PHP files, I have this line:</p>

<pre><code>// Makes it easier to refer to things this way.
    $scripturl = $boardurl . '/index.php';
</code></pre>

<p>I tried just changing it to:</p>

<pre><code>// Makes it easier to refer to things this way.
    $scripturl = $boardurl . '/test';
</code></pre>

<p>However, that returned 404 errors. I was told that I needed to use preg_replace to make that happen. I looked at the PHP Manual, and it says I need a pattern, replacement, and a subject. I'm confused about the subject part.</p>

<p>I tried this, but no prevail:</p>

<pre><code>// Makes it easier to refer to things this way.
    $scripturl = $boardurl . preg_replace('/index.php','/test','?');
</code></pre>

<p>Here is an example URL: "domain.com/index.php?node=forum"</p>

<p>I want it to look like: "domain.com/test?node=forum"</p>
