Moderator: madimar

Post by acwildweb » Fri Nov 15, 2019 2:32 am

Salve a tutti. Ho un problema che non riesco a risolvere col mio sito. Ho il seguente file htaccess che se abilitato fa funzionare il sito correttamente, ma se tento di accedere al backoffice a parte che la pagina di login che non carica correttamente i css e le immagini delle icone sul frontoffice che vedo con dei caratteri strani, non riesco ad accedere con le mie credenziali. Se disattivo il file htaccess tutto ritorna a funzionare regolarmente. Un enorme grazie a chi vorrà aiutarmi!
il sito è https://www.acwild.it e la versione di OC è


# STARTCOOKIENITRO
<FilesMatch "\.(jpg|jpeg|png|gif|swf|svg|JPG|JPEG|PNG|GIF|SWF|SVG)$">
Header unset Cookie
Header unset Set-Cookie
</FilesMatch>
# ENDCOOKIENITRO
# STARTNITRO
Header unset ETag
Header unset Last-Modified
FileETag None

<IfModule mod_rewrite.c>
RewriteEngine On
RewriteCond %{SERVER_PORT} !^443$
RewriteRule ^(.*)$ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]
</IfModule>

#CSS JS XML TXT - 1 WEEK
<FilesMatch "\.(xml|txt)$">
Header set Cache-Control "max-age=604800, public"
</FilesMatch>

#JPG JPEG PNG GIF SWF SVG - 1 MONTH
<FilesMatch "\.(jpg|jpeg|png|gif|swf|svg|JPG|JPEG|PNG|GIF|SWF|SVG)$">
Header set Cache-Control "max-age=2678400, public"
ExpiresDefault "access plus 1 month"
Header set Last-Modified "Wed, 05 Jun 2009 06:40:46 GMT"
</FilesMatch>

#OTF WOFF TTF ICO PDF FLV - 1 MONTH
<FilesMatch "\.(otf|ico|pdf|flv|woff|ttf)$">
Header set Cache-Control "max-age=2678400, public"
ExpiresDefault "access plus 1 month"
</FilesMatch>
AddType image/svg+xml .svg
AddOutputFilterByType DEFLATE image/svg+xml
AddType application/x-font-woff .woff
AddOutputFilterByType DEFLATE application/x-font-woff
RewriteEngine On
RewriteRule .* - [E=HTTP_IF_MODIFIED_SINCE:%{HTTP:If-Modified-Since}]
RewriteCond %{SCRIPT_FILENAME} !-d
RewriteRule ^(\/?(catalog.*\/assets).+)\.css$ catalog/view/theme/assets//serveFile.php?t=css&l=6&p=$1&c=604800 [NC,L]
RewriteCond %{SCRIPT_FILENAME} !-d
RewriteRule ^(\/?(catalog.*\/assets).+)\.js$ catalog/view/theme/assets//serveFile.php?t=js&l=6&p=$1&c=604800 [NC,L]
# ENDNITRO
# 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 +SymLinksIfOwnerMatch

# Prevent Directoy listing
Options -Indexes

# Prevent Direct Access to files
<FilesMatch "(?i)((\.tpl|.twig|\.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/

RewriteBase /
# compress text, HTML, JavaScript, CSS, and XML
AddOutputFilterByType DEFLATE text/plain
AddOutputFilterByType DEFLATE text/html
AddOutputFilterByType DEFLATE text/xml
AddOutputFilterByType DEFLATE text/css
AddOutputFilterByType DEFLATE application/xml
AddOutputFilterByType DEFLATE application/xhtml+xml
AddOutputFilterByType DEFLATE application/rss+xml
AddOutputFilterByType DEFLATE application/javascript
AddOutputFilterByType DEFLATE application/x-javascript

# 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
RewriteRule ^sitemap.xml$ index.php?route=extension/feed/google_sitemap [L]
RewriteRule ^googlebase.xml$ index.php?route=extension/feed/google_base [L]
RewriteRule ^system/storage/(.*) 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

## EXPIRES CACHING ##
<IfModule mod_expires.c>
ExpiresActive On
ExpiresByType image/jpg "access 1 month"
ExpiresByType image/jpeg "access 1 month"
ExpiresByType image/gif "access 1 month"
ExpiresByType image/png "access 1 month"
ExpiresByType text/css "access 1 month"
ExpiresByType application/pdf "access 1 month"
ExpiresByType text/x-javascript "access 1 week"
ExpiresByType application/x-shockwave-flash "access 1 month"
ExpiresByType image/x-icon "access 1 month"
ExpiresDefault "access 1 month"
</IfModule>
## EXPIRES CACHING ##

# gzip #
<IfModule mod_deflate.c>
AddOutputFilterByType DEFLATE text/text text/html text/javascript text/plain text/xml application/xml text/css application/x-javascript application/javascript
# 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>
# gzip end #
Last edited by acwildweb on Fri Nov 15, 2019 2:46 am, edited 1 time in total.

Newbie

Posts

Joined
Thu Jan 17, 2019 7:48 pm

Post by flanders » Fri Nov 15, 2019 2:43 am

dovrebbe essere un problema di settaggi del server del tuo hosting.

prova a commentare
Options +FollowSymlinks

sostintuendolo così

#Options +FollowSymlinks
Options +SymLinksIfOwnerMatch

Color Size Table - A table for Colors and Sizes
Super Options - Options with quantities and calculate the upgrade total price automatically
Live New Price with Options - Update price product selecting options
Custom Plus Options - My Extensions


User avatar
Active Member

Posts

Joined
Sun Jun 03, 2012 11:01 pm
Location - Italy
Who is online

Users browsing this forum: No registered users and 2 guests