my .htaccess looks like this-
<IfModule mod_rewrite.c>
Options +FollowSymlinks
RewriteEngine on
RewriteBase /
RewriteRule ^auth\.php$ - [L]
RewriteRule ^static - [L]
RewriteRule (.*) router.php [L]
</IfModule>
It basically makes sure that all requests are routed to router.php (except auth.php and static folder)
Now the issue is that whenever I am POSTing forms, mod_rewrite is forcing HTTP POSTS to be routed to router.php.
How do I make sure that HTTP POSTs are not routed to router.php?
You can formulate conditions for rewrites based on diverse things the apache server offers, like request method or host. The directive is called
RewriteCond. Only requests matching one or multiple conditions then would be rewritten.%{REQUEST_METHOD}is a server variable that contains the request method. List of methods.