RewriteEngine On
RewriteBase /
RewriteRule ^.*[-/]l(\d+)-.*$ pressthisl/index\.php?id=$1&%{QUERY_STRING} [L]
RewriteRule ^l(\d+)-.*$ pressthisl/index\.php?id=$1&%{QUERY_STRING} [L]
RewriteRule ^x(\d+)[-/].*[-/]l(\d+)-.*$ pressthisl/index\.php?id=$1-$2&%{QUERY_STRING} [L]
RewriteRule ^x(\d+)[-/]l(\d+)[-/].*$ pressthisl/index\.php?id=$1-$2&%{QUERY_STRING} [L]
RewriteRule ^l(\d+)[-/].*[-/]x(\d+)[-/].*$ pressthisl/index\.php?id=$2-$1&%{QUERY_STRING} [L]
RewriteRule ^l(\d+)[-/]x(\d+)[-/].*$ pressthisl/index\.php?id=$2-$1&%{QUERY_STRING} [L]
RewriteRule ^.*[-/]l(\d+)[-/]x(\d+)[-/].*$ pressthisl/index\.php?id=$2-$1&%{QUERY_STRING} [L]
RewriteRule ^.*[-/]l(\d+)[-/].*[-/]x(\d+)[-/].*$ pressthisl/index\.php?id=$2-$1&%{QUERY_STRING} [L]
RewriteRule ^.*[-/]x(\d+)[-/].*[-/]l(\d+)[-/].*$ pressthisl/index\.php?id=$1-$2&%{QUERY_STRING} [L]
RewriteRule ^.*[-/]x(\d+)[-/]l(\d+)[-/].*$ pressthisl/index\.php?id=$1-$2&%{QUERY_STRING} [L]

RewriteEngine On
RewriteCond %{HTTP:HTTPS} !=on [NC]
RewriteRule ^(.*)$ https://raperfect.ru/$1 [R=301,L]

RewriteCond %{HTTP_HOST} .
RewriteCond %{HTTP_HOST} !^а\raperfect\.ru [NC]
#RewriteRule (.*) http://example-domain-please-change.com/$1 [R=301,L]
SetEnvIf X-Forwarded-Proto https HTTPS=on
#RewriteCond %{HTTP_HOST} .
#RewriteCond %{HTTP_HOST} !^www\.example-domain-please-change\.com [NC]
#RewriteRule (.*) http://www.example-domain-please-change.com/$1 [R=301,L]
#RewriteCond %{SERVER_PORT} !^443
#RewriteRule (.*) https://example-domain-please-change.com/$1 [R=301,L]
# The Friendly URLs part
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php?q=$1 [L,QSA]
#AddType text/x-component .htc
#php_flag register_globals Off
#php_flag zlib.output_compression On
#php_value zlib.output_compression_level 5
#ExpiresActive On
#ExpiresByType image/gif A2592000
#ExpiresByType image/jpeg A2592000
#ExpiresByType image/png A2592000
#BrowserMatch "MSIE" brokenvary=1
#BrowserMatch "Mozilla/4.[0-9]{2}" brokenvary=1
#BrowserMatch "Opera" !brokenvary
#SetEnvIf brokenvary 1 force-no-vary
IndexOptions +Charset=UTF-8
<IfModule mod_expires.c>
	ExpiresActive On
	ExpiresDefault "access 7 days"
	ExpiresByType application/javascript "access plus 1 year"
	ExpiresByType text/javascript "access plus 1 year"
	ExpiresByType text/css "access plus 1 year"
	ExpiresByType text/html "access plus 7 day"
	ExpiresByType text/x-javascript "access 1 year"
	ExpiresByType image/gif "access plus 1 year"
	ExpiresByType image/jpeg "access plus 1 year"
	ExpiresByType image/png "access plus 1 year"
	ExpiresByType image/jpg "access plus 1 year"
	ExpiresByType image/x-icon "access 1 year"
	ExpiresByType application/x-shockwave-flash "access 1 year"
</IfModule>
<ifModule mod_headers.c>
	<filesMatch "\.(ico|pdf|flv|jpg|jpeg|png|gif|swf)$">
		Header set Cache-Control "max-age=2592000, public"
	</filesMatch>
	<filesMatch "\.(css|js)$">
		Header set Cache-Control "max-age=2592000, public"
	</filesMatch>
	<filesMatch "\.(xml|txt)$">
		Header set Cache-Control "max-age=172800, public, must-revalidate"
	</filesMatch>
	<filesMatch "\.(html|htm|php)$">
		Header set Cache-Control "max-age=172800, private, must-revalidate"
	</filesMatch>
</ifModule>
<IfModule mod_setenvif.c>
	BrowserMatch "MSIE" force-no-vary
	BrowserMatch "Mozilla/4.[0-9]{2}" force-no-vary
</IfModule>