Jump to content
  • разработка интернет магазинов на opencart
  • доработка интернет магазинов на opencart

Нужна помощь с .htaccess


Recommended Posts

Здравствуйте, в добавок к багам которые я расписал в других темах добавилась еещё одна, при попытке удалить товар из всплываюещёй корзины он осиется им, или заменяется на тот, что был до него им же.  сайт цветыминск.бел

Поиск привел к тому что при отключенном кэше браузера сайт рилииет как надо. и я взглянул в .htaccess:

Спойлер


<IfModule mod_expires.c>
ExpiresActive On 
ExpiresDefault "access plus 5 seconds"
#ExpiresByType text/css "access plus 6 month" 
#ExpiresByType text/plain "access plus 6 month"
#ExpiresByType image/gif "access plus 6 month"
#ExpiresByType image/png "access plus 6 month" 
#ExpiresByType image/jpeg "access plus 6 month" 
#ExpiresByType application/x-javascript "access plus 6 month"
#ExpiresByType application/javascript "access plus 6 month"
#ExpiresByType application/x-icon "access plus 6 month" 

#ExpiresByType image/x-icon "access plus 2592000 seconds"
    #ExpiresByType image/jpeg "access plus 2592000 seconds"
   # ExpiresByType image/png "access plus 2592000 seconds"
	#ExpiresByType text/plain "access plus 2592000 seconds"
    #ExpiresByType image/gif "access plus 2592000 seconds"
    #кэшировать css, javascript и текстовые файлы на одну негделю
    #ExpiresByType text/css "access plus 604800 seconds"
    #ExpiresByType text/javascript "access plus 604800 seconds"
    #ExpiresByType application/javascript "access plus 604800 seconds"
    #ExpiresByType application/x-javascript "access plus 604800 seconds"
    #кэшировать html и htm файлы на один гдень
    #ExpiresByType text/html "access plus 43200 seconds"
    #кэшировать xml файлы на гдесять минут
    #ExpiresByType application/xhtml+xml "access plus 600 seconds"

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

#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|WEBP)$">
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
AddOutputFilterByType DEFLATE text/html
AddOutputFilterByType DEFLATE text/plain
AddOutputFilterByType DEFLATE text/xml
AddOutputFilterByType DEFLATE application/x-javascript
AddOutputFilterByType DEFLATE application/javascript
AddOutputFilterByType DEFLATE text/javascript
AddOutputFilterByType DEFLATE text/x-js
AddOutputFilterByType DEFLATE text/css
BrowserMatch ^Mozilla/4 gzip-only-text/html
   BrowserMatch ^Mozilla/4\.0[678] no-gzip
   BrowserMatch \bMSIE !no-gzip !gzip-only-text/html

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/journal3/assets//serveFile.php?t=css&l=4&p=$1&c=604800 [NC,L]
RewriteCond %{SCRIPT_FILENAME} !-d
RewriteRule ^(\/?(catalog.*\/assets).+)\.js$ catalog/view/theme/journal3/assets//serveFile.php?t=js&l=4&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 +FollowSymlinks

# 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/

#RewriteCond %{HTTPS} off
#RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI} [R=301,L]
RewriteBase /
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|svg)
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.
# Gzip

# 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

 

 

 Над сайтом порилиил один знаток который не выходит на связь, липотому что это мне модули кэширования которые я уже снес наворотили (Вижу несколько вариантов кэширования). Помогите пожалуйси ламеру разобраться что тут и как? Чтобы привести к нормальному виду этот файлик или погделитесь своим, исправно рилииющим.

Заранее спасипотому что, знаю что немного зачастил с темами)

Edited by AlexChapman
Link to comment
Share on other sites


Только что, nikifalex сказал:

верните гдефолтный htaccess

Ксити что за задача была у вашего пропавшего спеца?

Как раз ики поправить быстрогдействие. Посивил мне PageSpeed module на апач и что-то с модулями крутил.

Link to comment
Share on other sites


5 минут назад, AlexChapman сказал:

Как раз ики поправить быстрогдействие. Посивил мне PageSpeed module на апач и что-то с модулями крутил.

ну тогда все верно. Неднокие люди ик и ускоряют. Ищите теперьь его, чтобы удалял весь свой бред.

Link to comment
Share on other sites

14 минут назад, AlexChapman сказал:

Здравствуйте, в добавок к багам которые я расписал в других темах добавилась еещё одна, при попытке удалить товар из всплываюещёй корзины он осиется им, или заменяется на тот, что был до него им же.  сайт цветыминск.бел

Поиск привел к тому что при отключенном кэше браузера сайт рилииет как надо. и я взглянул в .htaccess:

  Скрыть контент


<IfModule mod_expires.c>
ExpiresActive On 
ExpiresDefault "access plus 5 seconds"
#ExpiresByType text/css "access plus 6 month" 
#ExpiresByType text/plain "access plus 6 month"
#ExpiresByType image/gif "access plus 6 month"
#ExpiresByType image/png "access plus 6 month" 
#ExpiresByType image/jpeg "access plus 6 month" 
#ExpiresByType application/x-javascript "access plus 6 month"
#ExpiresByType application/javascript "access plus 6 month"
#ExpiresByType application/x-icon "access plus 6 month" 

#ExpiresByType image/x-icon "access plus 2592000 seconds"
    #ExpiresByType image/jpeg "access plus 2592000 seconds"
   # ExpiresByType image/png "access plus 2592000 seconds"
	#ExpiresByType text/plain "access plus 2592000 seconds"
    #ExpiresByType image/gif "access plus 2592000 seconds"
    #кэшировать css, javascript и текстовые файлы на одну негделю
    #ExpiresByType text/css "access plus 604800 seconds"
    #ExpiresByType text/javascript "access plus 604800 seconds"
    #ExpiresByType application/javascript "access plus 604800 seconds"
    #ExpiresByType application/x-javascript "access plus 604800 seconds"
    #кэшировать html и htm файлы на один гдень
    #ExpiresByType text/html "access plus 43200 seconds"
    #кэшировать xml файлы на гдесять минут
    #ExpiresByType application/xhtml+xml "access plus 600 seconds"

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

#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|WEBP)$">
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
AddOutputFilterByType DEFLATE text/html
AddOutputFilterByType DEFLATE text/plain
AddOutputFilterByType DEFLATE text/xml
AddOutputFilterByType DEFLATE application/x-javascript
AddOutputFilterByType DEFLATE application/javascript
AddOutputFilterByType DEFLATE text/javascript
AddOutputFilterByType DEFLATE text/x-js
AddOutputFilterByType DEFLATE text/css
BrowserMatch ^Mozilla/4 gzip-only-text/html
   BrowserMatch ^Mozilla/4\.0[678] no-gzip
   BrowserMatch \bMSIE !no-gzip !gzip-only-text/html

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/journal3/assets//serveFile.php?t=css&l=4&p=$1&c=604800 [NC,L]
RewriteCond %{SCRIPT_FILENAME} !-d
RewriteRule ^(\/?(catalog.*\/assets).+)\.js$ catalog/view/theme/journal3/assets//serveFile.php?t=js&l=4&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 +FollowSymlinks

# 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/

#RewriteCond %{HTTPS} off
#RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI} [R=301,L]
RewriteBase /
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|svg)
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.
# Gzip

# 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

 

 

 Над сайтом порилиил один знаток который не выходит на связь, липотому что это мне модули кэширования которые я уже снес наворотили (Вижу несколько вариантов кэширования). Помогите пожалуйси ламеру разобраться что тут и как? Чтобы привести к нормальному виду этот файлик или погделитесь своим, исправно рилииющим.

Заранее спасипотому что, знаю что немного зачастил с темами)

Я вам с удовольствием помогу, после того как вы себе вырежете аппендицит самостоятельно.
Есть все ики опрегделенные вещи, которыми должна заниматься специалисты.

Link to comment
Share on other sites


27 минут назад, nikifalex сказал:

верните гдефолтный htaccess

Ксити что за задача была у вашего пропавшего спеца?

Спасипотому что помогло с ошибкой. Правда теперьь ситус заказа поменять не могу - всплываюещёе окно со словом error

Link to comment
Share on other sites


Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...

Important Information

On our site, cookies are used and personal data is processed to improve the user interface. To find out what and what personal data we are processing, please go to the link. If you click "I agree," it means that you understand and accept all the conditions specified in this Privacy Notice.