Новости Joomla

0 Пользователей и 1 Гость просматривают эту тему.
  • 6 Ответов
  • 1143 Просмотров
*

sesil

  • Захожу иногда
  • 82
  • 0 / 0
  • Учусь!
Здравствуйте, такая проблема, открываю ссылку на несуществующею картинку мойСайт.ru/upload/images/kjahsdfkj.png и открывается главная страница и так при любом несуществующем файле, подскажите пожалуйста что не так?

вот мой htaccess
Код
## No directory listings
<IfModule autoindex>
  IndexIgnore *
</IfModule>

## Suppress mime type detection in browsers for unknown types
<IfModule mod_headers.c>
Header always set X-Content-Type-Options "nosniff"
</IfModule>

## Can be commented out if causes errors, see notes above.
Options +FollowSymlinks
Options -Indexes

## Mod_rewrite in use.

DirectoryIndex index.php

RewriteEngine On
ErrorDocument 404 /cli/err404.php

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

RewriteRule ^sitemap(.*).xml$ /index.php?option=com_sitemap&task=sitemap [L]
RewriteRule ^catalog_item(.*).xml$ /index.php?option=com_sitemap&task=sitemapcatalog [L]
RewriteRule ^catalog_cat(.*).xml$ /index.php?option=com_sitemap&task=sitemapcatalogcat [L]
RewriteRule ^catalog_img(.*).xml$ /index.php?option=com_sitemap&task=sitemapimages [L]

RewriteRule ^turbopages(.*).yml$ /index.php?option=com_sitemap&task=turbopages [L]
RewriteRule ^turbopagesxml(.*).xml /index.php?option=com_sitemap&task=turbopagesXML [L]

## Begin - Rewrite rules to block out some common exploits.
# If you experience problems on your site then comment out the operations listed
# below by adding a # to the beginning of the line.
# This attempts to block the most common type of exploit `attempts` on Joomla!
#
# Block any script trying to base64_encode data within the URL.
RewriteCond %{QUERY_STRING} base64_encode[^(]*\([^)]*\) [OR]
# Block any script that includes a <script> tag in URL.
RewriteCond %{QUERY_STRING} (<|%3C)([^s]*s)+cript.*(>|%3E) [NC,OR]
# Block any script trying to set a PHP GLOBALS variable via URL.
RewriteCond %{QUERY_STRING} GLOBALS(=|\[|\%[0-9A-Z]{0,2}) [OR]
# Block any script trying to modify a _REQUEST variable via URL.
RewriteCond %{QUERY_STRING} _REQUEST(=|\[|\%[0-9A-Z]{0,2})
# Return 403 Forbidden header and show the content of the root home page
RewriteRule .* index.php [F]
#
## End - Rewrite rules to block out some common exploits.

## Begin - Custom redirects
#
# If you need to redirect some pages, or set a canonical non-www to
# www redirect (or vice versa), place that code here. Ensure those
# redirects use the correct RewriteRule syntax and the [R=301,L] flags.
#
## End - Custom redirects

##
# Uncomment the following line if your webserver's URL
# is not directly related to physical file paths.
# Update Your Joomla! Directory (just / for root).
##

 RewriteBase /

## Begin - Joomla! core SEF Section.
#
RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}]
#
# If the requested path and file is not /index.php and the request
# has not already been internally rewritten to the index.php script
RewriteCond %{REQUEST_URI} !^/index\.php
# and the requested path and file doesn't directly match a physical file
RewriteCond %{REQUEST_FILENAME} !-f
# and the requested path and file doesn't directly match a physical folder
RewriteCond %{REQUEST_FILENAME} !-d
# internally rewrite the request to the index.php script
RewriteRule .* index.php [L]
#
## End - Joomla! core SEF Section.
## BEGIN EXPIRES CACHING - JCH OPTIMIZE ##
<IfModule mod_expires.c>
  ExpiresActive on

# Perhaps better to whitelist expires rules? Perhaps.
  ExpiresDefault "access plus 1 year"

# cache.appcache needs re-requests in FF 3.6 (thanks Remy ~Introducing HTML5)
  ExpiresByType text/cache-manifest "access plus 0 seconds"

# Your document HTML
  ExpiresByType text/html "access plus 0 seconds"

# Data
  ExpiresByType text/xml "access plus 0 seconds"
  ExpiresByType application/xml "access plus 0 seconds"
  ExpiresByType application/json "access plus 0 seconds"

# Feed
  ExpiresByType application/rss+xml "access plus 1 hour"
  ExpiresByType application/atom+xml "access plus 1 hour"

# Favicon (cannot be renamed)
  ExpiresByType image/x-icon "access plus 1 week"

# Media: images, video, audio
  ExpiresByType image/gif "access plus 1 year"
  ExpiresByType image/png "access plus 1 year"
  ExpiresByType image/jpg "access plus 1 year"
  ExpiresByType image/jpeg "access plus 1 year"
  ExpiresByType video/ogg "access plus 1 year"
  ExpiresByType audio/ogg "access plus 1 year"
  ExpiresByType video/mp4 "access plus 1 year"
  ExpiresByType video/webm "access plus 1 year"
  ExpiresByType video/webp "access plus 1 year"

# HTC files (css3pie)
  ExpiresByType text/x-component "access plus 1 year"

# Webfonts
  ExpiresByType application/font-ttf "access plus 1 year"
  ExpiresByType font/opentype "access plus 1 year"
  ExpiresByType application/font-woff "access plus 1 year"
  ExpiresByType application/font-woff2 "access plus 1 year"
  ExpiresByType image/svg+xml "access plus 1 year"
  ExpiresByType application/vnd.ms-fontobject "access plus 1 year"

# CSS and JavaScript
  ExpiresByType text/css "access plus 1 year"
  ExpiresByType application/javascript "access plus 1 year"

  <IfModule mod_headers.c>
    Header append Cache-Control "public"
    <FilesMatch ".(js|css|xml|gz|html)$">
       Header append Vary: Accept-Encoding
    </FilesMatch>
  </IfModule>

</IfModule>

<IfModule mod_deflate.c>
AddOutputFilterByType DEFLATE text/html
AddOutputFilterByType DEFLATE text/css
AddOutputFilterByType DEFLATE text/javascript
AddOutputFilterByType DEFLATE text/xml
AddOutputFilterByType DEFLATE text/plain
AddOutputFilterByType DEFLATE image/x-icon
AddOutputFilterByType DEFLATE image/svg+xml
AddOutputFilterByType DEFLATE application/rss+xml
AddOutputFilterByType DEFLATE application/javascript
AddOutputFilterByType DEFLATE application/x-javascript
AddOutputFilterByType DEFLATE application/xml
AddOutputFilterByType DEFLATE application/xhtml+xml
AddOutputFilterByType DEFLATE application/font
AddOutputFilterByType DEFLATE application/font-truetype
AddOutputFilterByType DEFLATE application/font-ttf
AddOutputFilterByType DEFLATE application/font-otf
AddOutputFilterByType DEFLATE application/font-opentype
AddOutputFilterByType DEFLATE application/font-woff
AddOutputFilterByType DEFLATE application/font-woff2
AddOutputFilterByType DEFLATE application/vnd.ms-fontobject
AddOutputFilterByType DEFLATE font/ttf
AddOutputFilterByType DEFLATE font/otf
AddOutputFilterByType DEFLATE font/opentype
AddOutputFilterByType DEFLATE font/woff
AddOutputFilterByType DEFLATE font/woff2
# For Olders Browsers Which Can't Handle Compression
BrowserMatch ^Mozilla/4 gzip-only-text/html
BrowserMatch ^Mozilla/4\.0[678] no-gzip
BrowserMatch \bMSIE !no-gzip !gzip-only-text/html
</IfModule>
## END EXPIRES CACHING - JCH OPTIMIZE ##
*

Kostelano

  • Давно я тут
  • 525
  • 51 / 1
Здравствуйте! Не совсем понятна проблема:
Вы открываете несуществующий адрес (картинку/файл) и выполняется переадресация на главную страницу сайта?
А в чем проблема? Норм решение.

Что касается вашего .htaccess, то в нем нет подобного правила.
Вполне возможно, что поставлена соответствующая галочка в панели управления вашим сайтом на хостинге. Смотрите там.
*

sesil

  • Захожу иногда
  • 82
  • 0 / 0
  • Учусь!
Здравствуйте! Не совсем понятна проблема:
Вы открываете несуществующий адрес (картинку/файл) и выполняется переадресация на главную страницу сайта?
А в чем проблема? Норм решение.

Что касается вашего .htaccess, то в нем нет подобного правила.
Вполне возможно, что поставлена соответствующая галочка в панели управления вашим сайтом на хостинге. Смотрите там.

Из за RewriteRule .* index.php [L] у меня на сайте открываются такие урлы мойСайт.ru/upload/images/kajhskjhasf.png и если открыть этот URL, откроется главная страница, картинки на сервере нет, он по умолчанию открывает главную страницу на несуществующую картинку. Если я удаляю строчку RewriteRule .* index.php [L] то при попытке открыть ссылку на несуществующей картинку, пишет ошибку что запрашиваемой страницы не существует. Но при этом и ЧПУ перестает работать.
*

Kostelano

  • Давно я тут
  • 525
  • 51 / 1
sesil
С чего взяли связь с вашими URL на несуществующие картинки и стандартным набором правил для .htaccess?
ЧПУ перестает работать потому что меняете набор правил для SEF-ядра Joomla. Он таков:
Код
### Раздел SEF-ядра Joomla!
RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}]
RewriteCond %{REQUEST_URI} !^/index\.php
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule .* index.php [L]
Еще раз: или пересмотрите сторонние плагины с подобным функционалом, или покопайтесь в панели управления хостинга - там может быть подобный параметр: что-то типа защиты файлов (HotLink).

Как вариант, замените ваш .htaccess на стандартный Joomla.
*

robert

  • Живу я здесь
  • 4974
  • 457 / 20
С чего взяли связь с вашими URL на несуществующие картинки и стандартным набором правил для .htaccess?
ЧПУ перестает работать потому что меняете набор правил для SEF-ядра Joomla. Он таков:
Вы хоть понимаете, что сами-то написали?
Код
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
Что, по-вашему, значат эти строки?
Не будь паразитом, сделай что-нибудь самостоятельно!
*

goga_pgasovav

  • Захожу иногда
  • 385
  • 4 / 0
  • Внимательный джумловод
sesil,
ваш сайт в настройках включен или выключен?
Если выключен, то 404-я не отображается, а всегда переадресовывает на Главную.
*

sesil

  • Захожу иногда
  • 82
  • 0 / 0
  • Учусь!
sesil,
ваш сайт в настройках включен или выключен?
Если выключен, то 404-я не отображается, а всегда переадресовывает на Главную.
А как включить?
Чтобы оставить сообщение,
Вам необходимо Войти или Зарегистрироваться
 

Не создается и не дублируется страница в приложении

Автор Слава

Ответов: 0
Просмотров: 325
Последний ответ 18.10.2023, 12:12:43
от Слава
Несуществующая страница отдает код 200

Автор Zegeberg

Ответов: 2
Просмотров: 441
Последний ответ 28.09.2023, 15:18:43
от web1
Joomla 3 не пускает в админку (просто перезагружается страница) (гуглил, нашёл решение, не помогло)

Автор lifelover2b

Ответов: 10
Просмотров: 2825
Последний ответ 18.04.2023, 09:32:55
от Akeksandr
Как определить главную страницу без меню?

Автор d0ublezer0

Ответов: 4
Просмотров: 939
Последний ответ 23.03.2023, 13:26:57
от gen2023
После авторизации открывается не та страница

Автор romagromov

Ответов: 1
Просмотров: 320
Последний ответ 09.12.2022, 22:28:46
от romagromov