Mod Rewrite WWW. redirection adding "index.php" to URL

Has anyone seen the following mod rewrite .htaccess configuration redirect in a way that results in “index.php” being added to the URL, as well as the first directory in the path being removed. Here’s my mod rewrite directives:




RewriteRule . index.php


RewriteCond %{HTTP_HOST} ^mysite.com [NC]

RewriteRule ^(.*)$ http://www.mysite.com/$1 [R=301,L]



So a URL like this:

http://mysite.com/page/movies/action/1998

will redirect to this:

http://www.mysite.com/index.php/movies/action/1998

Notice that the "page" directory is gone, and "index.php" is in its place. Anyone seen this before? Anyone have any fixes?




RewriteRule ^/page(.*) /index.php$1 [PT]



I use the same approach for my websites

the rewrite rules of my htaccess are




RewriteCond %{HTTP_HOST} !^www\.       		[NC]

RewriteCond %{HTTP_HOST} ^([^.]+(\.[a-z]{2,6})*)$ [NC]

RewriteRule ^(.*)$   	http://www.%1/$1  	[R=301,L]


# if a directory or a file exists, use it directly

RewriteCond %{REQUEST_FILENAME} !-f

RewriteCond %{REQUEST_FILENAME} !-d


# otherwise forward it to index.php

RewriteRule . index.php