RewriteEngine On # Turn on the rewriting engine
RewriteRule ^items/?$ items/index.php?f=list&%{QUERY_STRING} [NC,L]
#RewriteRule ^messages/texts?$ messages/index.php?f=texts&%{QUERY_STRING} [NC,L]
#RewriteRule ^messages/([0-9]+)/?$ messages/index.php?f=detail&id=$1&%{QUERY_STRING} [NC,L]
#RewriteRule ^messages/last_update/([0-9]+)/?$ messages/index.php?id=$1&f=last_update&%{QUERY_STRING} [NC,L]
#RewriteRule ^messages/date/?$ messages/index.php?date=$1&f=query_by_date&%{QUERY_STRING} [NC,L]
#RewriteRule ^login/?$ login/index.php [NC,L]

<IfModule mod_headers.c>
    Header always set Access-Control-Allow-Origin "*"
    Header always set Access-Control-Allow-Headers "Content-Type, Authorization"
    Header always set Access-Control-Allow-Methods "GET,PUT,POST,DELETE,OPTIONS"
    Header always set Access-Control-Allow-Credentials true
</IfModule>