#SetEnv PHP_VALUE "display_errors = on"
#SetEnv PHP_VALUE "display_startup_errors = on"
Options +ExecCGI
<IfModule mod_rewrite.c>
    <IfModule mod_negotiation.c>
        Options -MultiViews -Indexes
    </IfModule>
Options +FollowSymLinks

    RewriteEngine On
RewriteBase /
    RewriteCond %{HTTPS} !=on
    RewriteRule ^(.*)$ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301,NE] 

# Redirect non-www to www
RewriteCond %{HTTP_HOST} ^ruparelspremiamulund.com [NC]
RewriteRule ^(.*)$ http://www.ruparelspremiamulund.com/$1 [L,R=301]

    # Handle Authorization Header
    RewriteCond %{HTTP:Authorization} .
    RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}]

    # Redirect Trailing Slashes If Not A Folder...
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteCond %{REQUEST_URI} (.+)/$
    RewriteRule ^ %1 [L,R=301]

    # Handle Front Controller...
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteRule ^ index.php [L]
</IfModule>
# BEGIN GzipWpFastestCache
<IfModule mod_deflate.c>
# Compress HTML, CSS, JavaScript, Text, XML and fonts
  AddOutputFilterByType DEFLATE application/javascript
  AddOutputFilterByType DEFLATE application/rss+xml
  AddOutputFilterByType DEFLATE application/vnd.ms-fontobject
  AddOutputFilterByType DEFLATE application/x-font
  AddOutputFilterByType DEFLATE application/x-font-opentype
  AddOutputFilterByType DEFLATE application/x-font-otf
  AddOutputFilterByType DEFLATE application/x-font-truetype
  AddOutputFilterByType DEFLATE application/x-font-ttf
  AddOutputFilterByType DEFLATE application/x-javascript
  AddOutputFilterByType DEFLATE application/xhtml+xml
  AddOutputFilterByType DEFLATE application/xml
  AddOutputFilterByType DEFLATE font/opentype
  AddOutputFilterByType DEFLATE font/otf
  AddOutputFilterByType DEFLATE font/ttf
  AddOutputFilterByType DEFLATE image/svg+xml
  AddOutputFilterByType DEFLATE image/x-icon
  AddOutputFilterByType DEFLATE text/css
  AddOutputFilterByType DEFLATE text/html
  AddOutputFilterByType DEFLATE text/javascript
  AddOutputFilterByType DEFLATE text/plain
  AddOutputFilterByType DEFLATE text/xml

  # Remove browser bugs (only needed for really old browsers)
  BrowserMatch ^Mozilla/4 gzip-only-text/html
  BrowserMatch ^Mozilla/4\.0[678] no-gzip
  BrowserMatch \bMSIE !no-gzip !gzip-only-text/html
  Header append Vary User-Agent
</IfModule>
# END GzipWpFastestCache
## EXPIRES CACHING ##
<IfModule mod_expires.c>
  ExpiresActive On

  # Images
  ExpiresByType image/jpeg "access plus 1 day"
  ExpiresByType image/gif "access plus 1 day"
  ExpiresByType image/png "access plus 1 day"
  ExpiresByType image/webp "access plus 1 day"
  ExpiresByType image/svg+xml "access plus 1 day"
  ExpiresByType image/x-icon "access plus 1 day"

  # Video
  ExpiresByType video/webm "access plus 1 day"
  ExpiresByType video/mp4 "access plus 1 day"
  ExpiresByType video/mpeg "access plus 1 day"

  # Fonts
  ExpiresByType font/ttf "access plus 1 day"
  ExpiresByType font/otf "access plus 1 day"
  ExpiresByType font/woff "access plus 1 day"
  ExpiresByType font/woff2 "access plus 1 day"
  ExpiresByType application/font-woff "access plus 1 day"

  # CSS, JavaScript
  ExpiresByType text/css "access plus 1 day"
  ExpiresByType text/javascript "access plus 1 day"
  ExpiresByType application/javascript "access plus 1 day"

  # Others
  ExpiresByType application/pdf "access plus 1 day"
  ExpiresByType image/vnd.microsoft.icon "access plus 1 day"
</IfModule>

<ifModule mod_gzip.c>
mod_gzip_on Yes
mod_gzip_dechunk Yes
mod_gzip_item_include file .(html?|txt|css|js|php|pl)$
mod_gzip_item_include handler ^cgi-script$
mod_gzip_item_include mime ^text/.*
mod_gzip_item_include mime ^application/x-javascript.*
mod_gzip_item_exclude mime ^image/.*
mod_gzip_item_exclude rspheader ^Content-Encoding:.*gzip.*
</ifModule>
## EXPIRES CACHING ##
# 1 Month for most static assets
<filesMatch ".(webp|css|jpg|jpeg|png|gif|js|ico|woff|woff2)$">
Header set Cache-Control "max-age=2592000, public"
</filesMatch>
<FilesMatch "\.(webp|css|js|pdf|ttf|otf|woff|woff2)$">
<IfModule mod_headers.c>
Header always set Access-Control-Allow-Origin: "*"
Header always set Access-Control-Allow-Origin: https://d1zdkpwby52v4t.cloudfront.net
</IfModule>
</FilesMatch>
#Header set Access-Control-Allow-Origin "*"
#AddOutputFilter DEFLATE css js
#ExpiresActive On
#ExpiresByType application/x-javascript A2592000

# Prevent Directory listing
Options -Indexes
ErrorDocument 403 "<html><head><title>Security Warning!</title></head><body style='background-color:#000;'><br><br><center><h2 style=\"font-family: 'Open Sans', sans-serif;background:#fff;color:#fff;padding:20px;font-weight:normal;\"><span style='background:red;color:#fff;padding:10px;'>&nbsp;&nbsp;&nbsp;&#10008; There is nothing here..</span><span style='background:black;color:#fff;padding:10px;'> The page you are looking for doesn`t exist.! &#127940; &nbsp;&nbsp;&nbsp;</span></h2></center></body></html>"
ErrorDocument 404 "<html><head><title>Security Warning!</title></head><body style='background-color:#000;'><br><br><center><h2 style=\"font-family: 'Open Sans', sans-serif;background:#000;color:#fff;padding:20px;font-weight:normal;\"><span style='background:red;color:#fff;padding:10px;'>&nbsp;&nbsp;&nbsp;&#10008; There is nothing here..</span><span style='background:#fff;color:red;padding:10px;'> The page you are looking for doesn`t exist.! &#127940; &nbsp;&nbsp;&nbsp;</span></h2></center></body></html>"
# Prevent Directory listing

# BEGIN cPanel-generated php ini directives, do not edit
# Manual editing of this file may result in unexpected behavior.
# To make changes to this file, use the cPanel MultiPHP INI Editor (Home >> Software >> MultiPHP INI Editor)
# For more information, read our documentation (https://go.cpanel.net/EA4ModifyINI)
<IfModule php7_module>
   php_flag short_open_tag On
   php_flag display_errors Off
   php_flag display_startup_errors On
   php_value max_execution_time 30
   php_value max_input_time 60
   php_value max_input_vars 1000
   php_value memory_limit 512M
   php_value post_max_size 100M
   php_value session.gc_maxlifetime 1440
   php_value session.save_path ""
   php_value upload_max_filesize 100M
   php_flag zlib.output_compression Off
</IfModule>
<IfModule lsapi_module>
   php_flag short_open_tag On
   php_flag display_errors Off
   php_flag display_startup_errors On
   php_value max_execution_time 30
   php_value max_input_time 60
   php_value max_input_vars 1000
   php_value memory_limit 512M
   php_value post_max_size 100M
   php_value session.gc_maxlifetime 1440
   php_value session.save_path ""
   php_value upload_max_filesize 100M
   php_flag zlib.output_compression Off
</IfModule>
# END cPanel-generated php ini directives, do not edit

# php -- BEGIN cPanel-generated handler, do not edit
# Set the “ea-php80” package as the default “PHP” programming language.
<IfModule mime_module>
  AddHandler application/x-httpd-ea-php80 .php .php8 .phtml
</IfModule>
# php -- END cPanel-generated handler, do not edit
