Click here to Skip to main content
15,849,180 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I am trying to eliminate my file extension .php and add a / to open it for forward url stacking. With of course keeping infinite loops on mind. This is what I have in htaccess file. What am I doing wrong?

<IfModule mod_rewrite.c>
   RewriteCond %{HTTPS} !=on
   RewriteCond %{HTTP_HOST} !^www\..+$ [NC]
   RewriteRule ^ http://www.%{HTTP_HOST}%{REQUEST_URI} [R=301,L]   

# Removes index.php from ExpressionEngine URLs 
 <IfModule mod_rewrite.c>
        RewriteCond $1 !\.(gif|jpe?g|png)$ [NC]
        RewriteCond %{REQUEST_FILENAME} !-f
        RewriteCond %{REQUEST_FILENAME} !-d
        RewriteRule ^(.*)$ /index.php/$1 [L]

Thank you

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900