#

AddDefaultCharset UTF-8
RewriteEngine On

# tmp, for debug
#RedirectPermanent      /API/Events     https://www.ya.ru/

<FilesMatch "\.(xml)$">
	Order allow,deny
	Deny from all
</FilesMatch>

<FilesMatch "\.(log)$">
	Order allow,deny
	Deny from all
</FilesMatch>

<FilesMatch "\.(ini)$">
	Order allow,deny
	Deny from all
</FilesMatch>

# ссылки в почте, на оплату выписанных счетов, красивые
RedirectMatch	/Invoices/([0-9]*)/$				/Invoices?InvoiceID=$1
# ссылки в почте на оплату услуг, красивые
RedirectMatch	/([a-zA-Z]*)Orders/([0-9]*)/$			/$1Orders?OrderID=$2
# ссылки в почте на смену тарифа, и тоже красивые =)
RedirectMatch	/([a-zA-Z]*)Orders/([0-9]*)/(SchemeChange)/$	/$1Orders?OrderID=$2&SchemeChange=1

RewriteCond %{REQUEST_URI} (.*)
RewriteRule ^(install|public|styles|v2|index.php) - [L]
#RewriteCond %{HTTPS} !=on
#RewriteRule (.*) https://%{SERVER_NAME}/$1 [R,L]
RewriteRule (.*) /index.php
Options -Indexes


<IfModule mod_headers.c>
	<FilesMatch "\.(css|js|png)$">
		Header set Cache-Control "max-age=600, proxy-revalidate"
	</FilesMatch>
</IfModule>

<IfModule mod_php5.c>
	# added by lissyara 2011-09-13 in 13:37 MSK
	php_flag magic_quotes_gpc	Off
	php_flag short_open_tag		Off
	php_flag output_buffering	Off
	# added by lissyara 2012-03-21 in 11:09 MSK
	php_flag log_errors		On
	php_flag display_errors		Off
	php_flag display_startup_errors	Off
</IfModule>

# added by lissyara 2020-05-06 in 18:59 MSK
<IfModule mod_php7.c>
	php_flag magic_quotes_gpc	Off
	php_flag short_open_tag		Off
	php_flag output_buffering	Off
	php_flag log_errors		On
	php_flag display_errors		Off
	php_flag display_startup_errors	Off
</IfModule>

