Перейти до вмісту
Пошук в
  • Детальніше...
Шукати результати, які ...
Шукати результати в ...

[Решено] 403 forbidden для файла по прямой ссылке


Recommended Posts

Очень прошу помочь советом знатоков ;)

 

По прямой ссылке на любой файл (не картинка) появляется ошибка 403

 

К пример: https:......./import/import_cfo-group.xml

 

Вроде и .htaccess пересмотрел но ничего не помогает.

 

Спойлер

htaccess

 

 


RewriteEngine On 
RewriteCond %{HTTP_HOST} ^www........ru$ [NC] 
RewriteRule ^(.*)$ https://kidzlandia.ru/$1 [R=301,L]


RewriteEngine on
RewriteBase /
RewriteCond %{HTTPS} off
RewriteCond %{HTTP:X-Forwarded-Proto} !https
RewriteRule ^(.*)$ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]


RewriteCond %{THE_REQUEST} ^[A-Z]{3,9}\ /index\.php\ HTTP/
RewriteRule ^index\.php$ / [R=301,L]
RewriteCond %{THE_REQUEST} ^[A-Z]{3,9}\ /index\.html\ HTTP/
RewriteRule ^index\.html$ / [R=301,L]
RewriteCond %{THE_REQUEST} ^[A-Z]{3,9}\ /index\.htm\ HTTP/
RewriteRule ^index\.htm$ / [R=301,L]


 Options +SymLinksIfOwnerMatch
 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
RewriteCond %{REQUEST_FILENAME} !-d 
RewriteCond %{REQUEST_URI} ^(.+)/$ 
RewriteRule ^(.+)/$ /$1 [R=301,L] 
RewriteCond %{THE_REQUEST} //
RewriteRule .* /$0 [R=301,L]
# If your opencart installation does not run on the main web folder make sure you folder it does run in ie. / becomes /shop/

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

# использование gzip для уменьшения сайта
 <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 mime      ^text\.*
 mod_gzip_item_include mime      ^application/x-javascript.*
 mod_gzip_item_include mime      ^application/x-font-woff.*
 mod_gzip_item_exclude mime      ^image\.*
 mod_gzip_item_exclude rspheader ^Content-Encoding:.*gzip.*
 </IfModule>
 <IfModule mod_deflate.c>
 AddOutputFilterByType DEFLATE text/text text/html text/plain text/xml text/css application/x-javascript application/javascript
 </IfModule>


# кэш браузером на стороне клиентов (чтобы каждый раз не скачивать файлы с сервера, если клиенты несколько раз заходят
# <IfModule mod_expires.c>
# ExpiresActive On
# ExpiresDefault "access 7 days"
# ExpiresByType application/javascript "access plus 1 year"
# ExpiresByType text/javascript "access plus 1 year"
# ExpiresByType text/css "access plus 1 year"
# ExpiresByType text/html "access plus 7 day"
# ExpiresByType text/x-javascript "access 1 year"
# ExpiresByType image/gif "access plus 1 year"
# ExpiresByType image/jpeg "access plus 1 year"
# ExpiresByType image/png "access plus 1 year"
# ExpiresByType image/jpg "access plus 1 year"
# ExpiresByType image/x-icon "access 1 year"
# ExpiresByType application/x-shockwave-flash "access 1 year"
# </IfModule>


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


##Показываем все ошибки и предупреждения при разработке магазина. 
##Потом закомментировать
php_flag display_startup_errors on
php_flag display_errors on
php_flag html_errors on
php_flag track_errors on
#показывать все ошибки для PHP 5.4.x, 5.6.x 
php_value error_reporting 32767

 

Надіслати
Поділитися на інших сайтах


Путанный у Вас .htaccess какой-то, сложный.

Попробуйте эту строку

RewriteCond %{REQUEST_URI} !.*\.(ico|gif|jpg|jpeg|png|js|css)

заменить на

RewriteCond %{REQUEST_URI} !.*\.(ico|gif|jpg|jpeg|png|js|css|xml)

 

Надіслати
Поділитися на інших сайтах


36 минут назад, agefremov сказал:

 

заменить на


RewriteCond %{REQUEST_URI} !.*\.(ico|gif|jpg|jpeg|png|js|css|xml)

 

пробывал сразу же... не помогло...

 

update: куда только смотрел :rolleyes: в нужном каталоге свой htaccess ))) а его не замечал.

Змінено користувачем wizand1
Надіслати
Поділитися на інших сайтах


Створіть аккаунт або увійдіть для коментування

Ви повинні бути користувачем, щоб залишити коментар

Створити обліковий запис

Зареєструйтеся для отримання облікового запису. Це просто!

Зареєструвати аккаунт

Вхід

Уже зареєстровані? Увійдіть тут.

Вхід зараз
  • Зараз на сторінці   0 користувачів

    • Ні користувачів, які переглядиють цю сторінку

×
×
  • Створити...

Important Information

На нашому сайті використовуються файли cookie і відбувається обробка деяких персональних даних користувачів, щоб поліпшити користувальницький інтерфейс. Щоб дізнатися для чого і які персональні дані ми обробляємо перейдіть за посиланням . Якщо Ви натиснете «Я даю згоду», це означає, що Ви розумієте і приймаєте всі умови, зазначені в цьому Повідомленні про конфіденційність.