I found an easy way to resolve this in ExpressionEngine instead of relying on the .htaccess file. At the top of my index template for my default template group, I put the following:
{if segment_1 == "index" && segment_2}
{redirect="/{segment_2}"}
{/if}
In this case, we have up to three layers of hierarchy, so this is what we’re using:
{if segment_1 == "index" && segment_2 && segment_3 && segment_4}
{redirect="/{segment_2}/{segment_3}/{segment_4}"}
{if:elseif segment_1 == "index" && segment_2 && segment_3}
{redirect="/{segment_2}/{segment_3}"}
{if:elseif segment_1 == "index" && segment_2}
{redirect="/{segment_2}"}
{if:elseif segment_1 == "index"}
{redirect="/"}
{/if}
And then we can simply add these redirects to our .htaccess file:
# After EE rewrite code
Redirect 301 /page_name <a href="http://domain.com/new_page_name">http://domain.com/new_page_name</a>
It’s not ideal to have two redirects like this, but it does the job.