How to resolve subfolder/index.php to subfolder/

Discussion in 'Apache' started by NavyCS, Jun 15, 2007.

  1. #1
    I have tryed everything I know how to get the domain.com/folder/index.php to redirect to domain.com/folder/ and can't seem to figure it out - here is what I have got myself to;
    
    # redirect all folder/index.php requests to folder/ 
    RewriteCond %{THE_REQUEST} ^[A-Z]{3,9}\ /([^/]+/)*/index\.php\ HTTP/ 
    RewriteRule ^(([^/]+/)*)index\.php$ http://www.domain.com/folder/$1 [R=301,L]
    
    Code (markup):
    Where am I going wrong? Thank you very much in advance!
     
    NavyCS, Jun 15, 2007 IP