How to redirect to relative url htaccess apache 2.22
<p>I'm trying to redirect the <code>rootdomain.com/index.php</code> to <code>rootdomain.com</code>, and just the root one, not any subdirectories also ending in <code>index.php</code></p>

<p>I've tried </p>

<p><code>Redirect 302 ^(.*)index.php$ /$1/</code></p>

<p><code>Redirect 302 ^(.*)index.php$ $1/</code></p>

<p><code>RewriteRule ^(.*)index.php$ $1/ [R=302,L]</code></p>

<p><code>RewriteRule ^(.*)index.php$ / [R=302,L]</code></p>

<p><code>RewriteRule ^(.*)index.php$ $1/ [R=302,L,QSD]</code></p>

<p><code>RewriteRule ^(.*)index.php$ / [R=302,L,QSD]</code></p>

<p>(I realize there are other questions like this. But the solutions in the other questions do not work for me)</p>