JezK
Edit File: .htaccess_move
# Compress file response package <IfModule mod_filter.c> AddOutputFilterByType DEFLATE "application/atom+xml" \ "application/javascript" \ "application/json" \ "application/ld+json" \ "application/manifest+json" \ "application/rdf+xml" \ "application/rss+xml" \ "application/schema+json" \ "application/vnd.geo+json" \ "application/vnd.ms-fontobject" \ "application/x-font-ttf" \ "application/x-javascript" \ "application/x-web-app-manifest+json" \ "application/xhtml+xml" \ "application/xml" \ "font/eot" \ "font/opentype" \ "image/bmp" \ "image/svg+xml" \ "image/vnd.microsoft.icon" \ "image/x-icon" \ "text/cache-manifest" \ "text/css" \ "text/html" \ "text/javascript" \ "text/plain" \ "text/vcard" \ "text/vnd.rim.location.xloc" \ "text/vtt" \ "text/x-component" \ "text/x-cross-domain-policy" \ "text/xml" </IfModule> # Leverage browser caching # Caching image and css file # Can turn off in chrome for development, # 1 - inspect element # 2 - click to network tab # 3 - check disable cache # Utilize Maximum Caching #<FilesMatch ".(jpg|jpeg|png|gif|swf|css|js|svg|ttf|ttc|otf|eot|woff2|woff)$"> # Header set Cache-Control "max-age=2592000, public" #</FilesMatch> # 1.To use URL Alias you need to be running apache with mod_rewrite enabled. # 2. In your opencart directory rename htaccess.txt to .htaccess. # For any support issues please visit: http://www.opencart.com Options +FollowSymlinks # Prevent Directoy listing Options -Indexes # Prevent Direct Access to files <FilesMatch "(?i)((\.tpl|\.ini|\.log|(?<!robots)\.txt))"> Require all denied ## For apache 2.2 and older, replace "Require all denied" with these two lines : # Order deny,allow # Deny from all </FilesMatch> # SEO URL Settings RewriteEngine On # If your opencart installation does not run on the main web folder make sure you folder it does run in ie. / becomes /shop/ # PHP 5.6 and below require the below line to be the project folder name after public_html #RewriteBase /boiler2/ # Redirect to www #RewriteCond %{HTTP_HOST} !^www\. #RewriteRule ^(.*)$ https://www.%{HTTP_HOST}/$1 [R=301,L] # Redirect to non-www #RewriteCond %{HTTP_HOST} ^www\.(.*) #RewriteRule ^.*$ https://%1/$1 [R=301,L] # Redirect to HTTPS RewriteCond %{HTTPS} !=on RewriteRule ^(.*)$ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301] # Error handling ErrorDocument 400 /error ErrorDocument 401 /error ErrorDocument 402 /error ErrorDocument 403 /error ErrorDocument 404 /error RewriteRule ^sitemap.xml$ index.php?route=extension/feed/google_sitemap [L] RewriteRule ^product-sitemap.xml$ index.php?route=extension/feed/google_sitemap/product [L] RewriteRule ^category-sitemap.xml$ index.php?route=extension/feed/google_sitemap/category [L] RewriteRule ^information-sitemap.xml$ index.php?route=extension/feed/google_sitemap/information [L] RewriteRule ^blog-sitemap.xml$ index.php?route=extension/feed/google_sitemap/blog [L] RewriteRule ^googlebase.xml$ index.php?route=extension/feed/google_base [L] RewriteRule ^system/download/(.*) index.php?route=error/not_found [L] RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteCond %{REQUEST_URI} !.*\.(ico|gif|jpg|jpeg|png|js|css) RewriteRule ^([^?]*) index.php?_route_=$1 [L,QSA] ### Additional Settings that may need to be enabled for some servers ### Uncomment the commands by removing the # sign in front of it. ### If you get an "Internal Server Error 500" after enabling any of the following settings, restore the # as this means your host doesn't allow that. # 1. If your cart only allows you to add one item at a time, it is possible register_globals is on. This may work to disable it: # php_flag register_globals off # 2. If your cart has magic quotes enabled, This may work to disable it: # php_flag magic_quotes_gpc Off # 3. Set max upload file size. Most hosts will limit this and not allow it to be overridden but you can try # php_value upload_max_filesize 999M # 4. set max post size. uncomment this line if you have a lot of product options or are getting errors where forms are not saving all fields # php_value post_max_size 999M # 5. set max time script can take. uncomment this line if you have a lot of product options or are getting errors where forms are not saving all fields # php_value max_execution_time 200 # 6. set max time for input to be recieved. Uncomment this line if you have a lot of product options or are getting errors where forms are not saving all fields # php_value max_input_time 200 # 7. disable open_basedir limitations # php_admin_value open_basedir none # 8. Set TimeZone #php_value date.timezone 'Asia/Singapore' # 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_value default_charset "UTF-8;" php_value memory_limit 64M php_value max_execution_time 36000 php_value upload_max_filesize 999M php_value mysql.connect_timeout 20 php_flag session.auto_start Off php_flag session.use_only_cookies On php_flag session.use_cookies On php_flag session.use_trans_sid Off php_value session.cookie_httponly "On;" php_value session.gc_maxlifetime 3600 php_flag short_open_tag On php_flag display_errors Off php_value max_input_time -1 php_value max_input_vars 10000 php_value post_max_size 20M php_value session.save_path "/var/cpanel/php/sessions/ea-php72" php_flag zlib.output_compression Off </IfModule> <IfModule lsapi_module> php_value default_charset "UTF-8;" php_value memory_limit 64M php_value max_execution_time 36000 php_value upload_max_filesize 999M php_value mysql.connect_timeout 20 php_flag session.auto_start Off php_flag session.use_only_cookies On php_flag session.use_cookies On php_flag session.use_trans_sid Off php_value session.cookie_httponly "On;" php_value session.gc_maxlifetime 3600 php_flag short_open_tag On php_flag display_errors Off php_value max_input_time -1 php_value max_input_vars 10000 php_value post_max_size 20M php_value session.save_path "/var/cpanel/php/sessions/ea-php72" 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-php72” package as the default “PHP” programming language. <IfModule mime_module> AddHandler application/x-httpd-ea-php72 .php .php7 .phtml </IfModule> # php -- END cPanel-generated handler, do not edit