After turning URL rewriting on and I've encountered one problem around Javascript HTTP requests.
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^([^\.]+)$ $1.php [NC,L]
RewriteCond %{THE_REQUEST} \ /(.+)\.php(\?|\ |$)
RewriteRule ^ /%1 [L,R=301]
xmlhttp.open("POST", "php/msg_send.php", true);
POST method simply didn't work but xmlhttp.open("GET", "php/language_check.php?lang="+langSelect, true);
GET method continued working well as before.
RewriteCond %{REQUEST_METHOD} POST
RewriteRule ^ - [L]
After adding this code in my .htaccess file POST method started working well.
I'm little confused because GET method worked fine after turning url rewriting on, but POST method did not. Is it true that xmlhttp GET can work well without adding some lines in .htaccess file but POST method can't? I would like someone to explain why is GET method working after url rewriting (deleting .php extension) but POST method doesn't.
Thanks in advance.