RewriteEngine On


RewriteCond %{REQUEST_URI} ^/en/$
RewriteRule ^(.*)$ %{REQUEST_URI}login [R]

#RewriteCond %{REQUEST_URI} !\.
#RewriteCond %{REQUEST_URI} !
#RewriteCond %{REQUEST_URI} ^/en/(.*)$
#RewriteRule ^(.*)$ $1.php [L]

#ErrorDocument 403 /index.php
#ErrorDocument 404 /index.php
#ErrorDocument 500 /index.php

RewriteCond %{HTTPS} off

RewriteCond %{REQUEST_URI} !^/login$
RewriteRule ^(.*)$ https://%{HTTP_HOST}%{REQUEST_URI} [R]

RewriteCond %{SERVER_PORT} ^443$
RewriteCond %{REQUEST_URI} ^/en/$
RewriteCond %{REQUEST_URI} !\.
RewriteRule ^(.*)$ $1.php

ErrorDocument 403 /index.php
ErrorDocument 404 /index.php
ErrorDocument 500 /index.php

#ErrorDocument 503 https://secure.iwl.world/maintenance.html
#RewriteCond %{REQUEST_URI} !^/css/
#RewriteCond %{REQUEST_URI} !^/js/
#RewriteCond %{REQUEST_URI} !^/img/
#RewriteCond %{REQUEST_URI} !^/maintenance
#RewriteCond %{REMOTE_ADDR} !^(180\.167\.5\.38|116\.228\.139\.34|116\.228\.133\.234|121\.58\.255\.132|11\.75\.187\.157|219\.90\.127\.39|219\.90\.127\.42|185\.147\.172\.132|185\.147\.174\.132)$
#RewriteRule ^.*$ - [R=503,L]
