
# DO NOT REMOVE THIS LINE AND THE LINES BELLOW SSL_REDIRECT:irckorea.com
RewriteEngine on
RewriteCond %{HTTPS} off
RewriteCond %{HTTP_HOST} (www\.)?irckorea.com
RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]
# DO NOT REMOVE THIS LINE AND THE LINES BELLOW SSL_REDIRECT:irckorea.com

# DO NOT REMOVE THIS LINE AND THE LINES BELLOW UPGRADE_INSECURE_REQUESTS:irckorea.com
Header always set Content-Security-Policy: upgrade-insecure-requests
# DO NOT REMOVE THIS LINE AND THE LINES BELLOW UPGRADE_INSECURE_REQUESTS:irckorea.com


# DO NOT REMOVE THIS LINE AND THE LINES BELLOW SSL_REDIRECT:irckorea.com
RewriteEngine on
RewriteCond %{HTTPS} off
RewriteCond %{HTTP_HOST} (www\.)?irckorea.com
RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]
# DO NOT REMOVE THIS LINE AND THE LINES BELLOW SSL_REDIRECT:irckorea.com

# Increase max_input_vars for large forms
php_value max_input_vars 5000
php_value suhosin.post.max_vars 5000
php_value suhosin.request.max_vars 5000

# Static asset browser caching (performance)
<IfModule mod_expires.c>
	ExpiresActive On

	# HTML/PHP should stay dynamic
	ExpiresByType text/html "access plus 0 seconds"
	ExpiresByType application/xhtml+xml "access plus 0 seconds"

	# CSS / JS
	ExpiresByType text/css "access plus 30 days"
	ExpiresByType application/javascript "access plus 30 days"
	ExpiresByType text/javascript "access plus 30 days"

	# Fonts
	ExpiresByType font/woff2 "access plus 30 days"
	ExpiresByType font/woff "access plus 30 days"
	ExpiresByType font/ttf "access plus 30 days"
	ExpiresByType font/otf "access plus 30 days"
	ExpiresByType application/vnd.ms-fontobject "access plus 30 days"

	# Images
	ExpiresByType image/svg+xml "access plus 30 days"
	ExpiresByType image/x-icon "access plus 30 days"
	ExpiresByType image/webp "access plus 30 days"
	ExpiresByType image/avif "access plus 30 days"
	ExpiresByType image/jpeg "access plus 30 days"
	ExpiresByType image/png "access plus 30 days"
	ExpiresByType image/gif "access plus 30 days"
</IfModule>

<IfModule mod_headers.c>
	# Prevent caching dynamic documents
	<FilesMatch "\.(php|html?)$">
		Header set Cache-Control "no-store, no-cache, must-revalidate, max-age=0"
		Header set Pragma "no-cache"
		Header set Expires "0"
	</FilesMatch>

	# Cache static resources
	<FilesMatch "\.(css|js|mjs|woff2|woff|ttf|otf|eot|svg|ico|webp|avif|jpg|jpeg|png|gif)$">
		Header set Cache-Control "public, max-age=2592000"
	</FilesMatch>
</IfModule>
