Reputation: 955
I've done this before, it was like a line of code. Now when I look for it, it's all 5-10 lines for just redirecting index.php to root (/
) in .htaccess.
What's the best way to do this?
Upvotes: 2
Views: 1011
Reputation: 35
might it be something like this that you are looking for:
Redirect 301 /index.php http://www.yoursite.com/folder/
Upvotes: 1
Reputation: 7170
This code works for me
RewriteCond %{THE_REQUEST} ^.*/index.php
RewriteRule ^(.*)index.php$ /$1 [R=301,L]
Upvotes: 4