2

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?

ramo
  • 945
  • 4
  • 12
  • 20
  • http://stackoverflow.com/questions/9369917/htaccess-redirect-index-php-to-root-including-subdomains – djb Apr 17 '13 at 13:10

2 Answers2

4

This code works for me

RewriteCond %{THE_REQUEST} ^.*/index.php 
RewriteRule ^(.*)index.php$ /$1 [R=301,L] 
Marcos Aguayo
  • 6,840
  • 8
  • 28
  • 61
1

might it be something like this that you are looking for:

Redirect 301 /index.php http://www.yoursite.com/folder/
Ansipants
  • 35
  • 7