Ecommerce software home
Shopping Cart Software Forum for Ecommerce Templates
 
Home | Profile | Register | Active Topics | Members | Search | FAQ
Username:
Password:
Save Password
Forgot your Password?

Find us on Facebook Follow us on Twitter View our YouTube channel
Search our site
Author « Topic »  

V45
Advanced Member

United Kingdom
416 Posts

Pre-sales questions only
(More Details...)

Posted - 06/18/2018 :  08:39:01  
The website this relates to works 99% fine but occasionally adding to cart can result in the item not showing in the cart until browser is refreshed & the second issue that has just raised its head is yesterday is when creating or editing a product option once save has been clicked the site returns to the login screen. The options are created / changes have been saved and that happens only with the product options, every other aspect works fine without logging out.

I've a moderately decent understanding of the htaccess file, but I would appreciate an experienced set of eyes having a shufty at the content of this ECT based store htaccess file. Anything that needs cleaning up, shouldn't be there at all, any order certain things should be in etc etc? Does it need to be on a diet, like me, or does it need 'beefing up'?

## Created 15.09.2017 - 13.40
##LastEdit 08.05.2018 02:15hrs
## Browser Caching
RewriteEngine On
RewriteCond %{HTTPS} !=on
RewriteRule ^ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]
## Keep Alive
<ifModule mod_headers.c>
Header set Connection keep-alive
</ifModule>
#Sets HTTPS Strict Transport Security Header. If SSL is removed from site this WILL stop visitors seeing website
Header set Strict-Transport-Security "max-age=31536000" env=HTTPS

## BrowserCaching
<IfModule mod_expires.c>
ExpiresActive On
ExpiresByType image/jpg "access plus 14 days”
ExpiresByType image/jpeg "access plus 14 days"
ExpiresByType image/gif "access plus 14 days"
ExpiresByType image/png "access plus 14 days"
ExpiresByType application/pdf "access plus 14 days"
ExpiresByType text/x-javascript "access 1 month"
ExpiresByType image/x-icon "access 1 year"
ExpiresByType text/html "access plus 2 days"
</IfModule>

#GZIP Compression
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
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 mod_expires.c>
# Enable expirations
ExpiresActive On
# My favicon
ExpiresByType image/x-icon "access plus 1 year"
# Images
ExpiresByType image/gif "access plus 1 month"
ExpiresByType image/png "access plus 1 month"
ExpiresByType image/jpg "access plus 1 month"
ExpiresByType image/jpeg "access plus 1 month"
# CSS
ExpiresByType text/css "access plus 1 month"
# Javascript
ExpiresByType application/javascript "access plus 1 year"
</IfModule>

# Cross Site Scripting Protection
<IfModule mod_headers.c>
# Set XSS Protection header
Header set X-XSS-Protection "1; mode=block"
</IfModule>

#This is for the ECT SearchEngineFriendlyURLs-Added-14.09.2017-02.35
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^category/([^/.]*)/?$ /categories.php?cat=$1 [QSA,nc,L,B]
RewriteRule ^products/([^/.]*)/?$ /products.php?cat=$1 [QSA,nc,L,B]
RewriteRule ^manufacturer/?$ /categories.php?man=all [QSA,nc,L,B]
RewriteRule ^manufacturer/([^/.]*)/?$ /products.php?man=$1 [QSA,nc,L,B]
RewriteRule ^([^/.]+)$ proddetail.php?prod=$1 [QSA,nc,L,B]
</IfModule>

#Set homepage & also if site is down for maintenance
#DirectoryIndex maintenance.php index.html site-down.php

# Permanent URL redirect -
#Redirect 301 / https://www.google.co.uk
# 404 Error Page
ErrorDocument 404 /404.php

Andy
ECT Moderator

95440 Posts

Posted - 06/18/2018 :  08:52:59  
Hi Will

I'm no htaccess expert but personally I wouldn't have any caching on an ecommerce site and it's almost certainly that which is causing the problem you see.

Andy

Please feel free to review / rate our software

midvalleydrifter001
Ecommerce Template Expert

USA
914 Posts

Posted - 06/18/2018 :  14:40:08  
Try changing this line:

ExpiresByType text/html "access plus 2 days"

To this:

ExpiresByType text/html "access plus 1 seconds"

  « Topic »  
Jump To:
Shopping Cart Software Forum for Ecommerce Templates © 2002-2022 ecommercetemplates.com
This page was generated in 0.02 seconds. Snitz Forums 2000