I have to pass a query string variable "_page" through .htaccess file, that gives 505 (internal server) error.
This is my .htaccess file:
DirectoryIndex index.php
<IfModule mod_rewrite.c>
RewriteEngine on
RewriteCond %{HTTP_HOST} !^www\.
RewriteRule ^(.*)$ http://www.%{HTTP_HOST}/$1 [R=301,L]
#Make sure that there is ALWAYS a querystring variable named "__page"
RewriteCond %{REQUEST_FILENAME} -f
RewriteRule ^(.*\.(php|xml))$ $1?__page=$1 [L,QSA]
#Append ".php" to the requested file
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME}.php -f
RewriteRule ^(.*)$ $1.php?__page=$1.php [L,QSA]
</IfModule>
When i comment the line
#RewriteRule ^(.*\.(php|xml))$ $1?__page=$1 [L,QSA]
in .htaccess file , the 505 goes , but it shows a warning " Undefined index: __page"