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

Natali365

  • Новичок
  • 3
  • 0 / 0
Здравствуйте. Сайт был создан (Joomla 1.5) в начале без SEF, но я решила включить SEF (стандартный) и mod_rewrite, так же прописать в .htaccess редирект 301, прописывала все точно так же, как было в прошлый раз (тогда я переезжала на другой компонент), все работало раньше, сейчас пишу и выдается ошибка на белом экране (Moved Permanently, The document has moved here.), обращалась к хостеру в техподдержку, там мне сказали, что возможно ошибка в синтаксисе .htaccess. Сразу скажу, что хостинг поддерживает mod_rewrite и раньше все работало. Кто разбирается, посмотрите, пожалуйста сам файл, сама в этом мало что понимаю

Цитировать
##
# @version $Id: htaccess.txt 21064 2011-04-03 22:12:19Z dextercowley $
# @package Joomla
# @copyright Copyright (C) 2005 - 2010 Open Source Matters. All rights reserved.
# @license http://www.gnu.org/copyleft/gpl.html GNU/GPL
# Joomla! is Free Software
##


#####################################################
#  READ THIS COMPLETELY IF YOU CHOOSE TO USE THIS FILE
#
# The line just below this section: 'Options +FollowSymLinks' may cause problems
# with some server configurations.  It is required for use of mod_rewrite, but may already
# be set by your server administrator in a way that dissallows changing it in
# your .htaccess file.  If using it causes your server to error out, comment it out (add # to
# beginning of line), reload your site in your browser and test your SEF url's.  If they work,
# it has been set by your server administrator and you do not need it set here.
#
#####################################################

##  Can be commented out if causes errors, see notes above.
Options +FollowSymLinks

#
#  mod_rewrite in use

########## Begin - Rewrite rules to block out some common exploits
## If you experience problems on your site block out the operations listed below
## This attempts to block the most common type of exploit `attempts` to Joomla!
#
## Deny access to extension XML files (uncomment out to activate)
#<Files ~ "\.xml$">
#Order allow,deny
#Deny from all
#Satisfy all
#</Files>
## End of deny access to extension XML files
# Block out any script trying to set a mosConfig value through the URL
RewriteCond %{QUERY_STRING} mosConfig_[a-zA-Z_]{1,21}(=|\%3D) [OR]
# Block out any script trying to base64_encode data within the URL
RewriteCond %{QUERY_STRING} base64_encode[^(]*\([^)]*\) [OR]
# Block out any script that includes a <script> tag in URL
RewriteCond %{QUERY_STRING} (<|%3C)([^s]*s)+cript.*(>|%3E) [NC,OR]
# Block out any script trying to set a PHP GLOBALS variable via URL
RewriteCond %{QUERY_STRING} GLOBALS(=|\[|\%[0-9A-Z]{0,2}) [OR]
# Block out 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 homepage
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 following line if your webserver's URL
#  is not directly related to physical file paths.
#  Update Your Joomla! Directory (just / for root)

RewriteBase /

RewriteEngine On
RewriteCond %{REQUEST_URI} ^/index.php
RewriteCond %{QUERY_STRING} option=com_k2&view=itemlist&layout=category&task=category&id=11937&Itemid=41
RewriteRule ^(.*)$ http://www.mysayt.ru/info/dokumenti [R=301]

########## 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 request is for root, or for an extensionless URL, or the
# requested URL ends with one of the listed extensions
RewriteCond %{REQUEST_URI} (/[^.]*|\.(php|html?|feed|pdf|raw))$ [NC]
# 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

AddDefaultCharset UTF-8
*

SDKiller

  • Живу я здесь
  • 2706
  • 329 / 5
  • ...ergo sum
Re: В чем ошибка синтаксиса .htaccess?
« Ответ #1 : 26.11.2011, 15:59:53 »
Цитировать
Ensure those
# redirects use the correct RewriteRule syntax and the [R=301,L] flags.

L добавьте в свой редирект
*

Natali365

  • Новичок
  • 3
  • 0 / 0
Re: В чем ошибка синтаксиса .htaccess?
« Ответ #2 : 27.11.2011, 04:49:27 »
L добавьте в свой редирект
Вставила, всё точно так же, причем заменила, что при вводе старого адреса (вместо нового из редиректа) адрес становится вот таким:
http://www.mysayt.ru/info/dokumenti?option=com_k2&view=itemlist&layout=category&task=category&id=1937&Itemid=41

при том, что старая страница
www.mysayi.ru/index.php?option=com_k2&view=itemlist&layout=category&task=category&id=11937&Itemid=41
а новая
http://www.mysayt.ru/info/dokumenti
адреса просто соединяются
*

Natali365

  • Новичок
  • 3
  • 0 / 0
Re: В чем ошибка синтаксиса .htaccess?
« Ответ #3 : 27.11.2011, 14:08:14 »
наконец-таки разобралась, техподдержка что-то там исправила, жду ответа, что именно
*

prossvika

  • Захожу иногда
  • 64
  • 3 / 0
Re: В чем ошибка синтаксиса .htaccess?
« Ответ #4 : 27.11.2011, 15:04:25 »
Проблема примерно аналогичная (нужно поковыряться в .htaccess и составить пример редиректа 301 для моей ситуации), кто ее сможет решить, заплачу на Webmoney, желающие пишите в личку с указанием стоимости
пример редиректа должен выглядить таким образом, чтобы в нем прописывался старый адрес страницы и переадресация на новый на том же домене с включенными в админке SEF и mod_rewrite
« Последнее редактирование: 27.11.2011, 15:09:49 от prossvika »
*

Aleks_El_Dia

  • Moderator
  • 3671
  • 353 / 0
  • AEDStudio Joomla! Direction
Re: В чем ошибка синтаксиса .htaccess?
« Ответ #5 : 27.11.2011, 21:23:09 »
Если есть на хостинге включен mod_alias то в htaccess добавьте Redirect 301 /old-page.html /new-page.html
Спам придумали боги в отместку за наши молитвы (с) Рома Воронежский
На молоко: Z369038872422 || R210017695494 || U247040729215 || ЯД 410011288250383
Мигрирую сайты, переношу расширения J!1.0->J!1.5->J!2.5. Более 50 успешных миграций.
*

01Kuzma

  • Захожу иногда
  • 171
  • 1 / 0
Re: В чем ошибка синтаксиса .htaccess?
« Ответ #6 : 20.09.2012, 16:53:21 »
Ошибся разделом. Сотрите моё сообщение
« Последнее редактирование: 20.09.2012, 17:38:28 от 01Kuzma »
Чтобы оставить сообщение,
Вам необходимо Войти или Зарегистрироваться
 

simpleform2 ошибка ajax error в Google chrome

Автор safronoff343

Ответов: 1
Просмотров: 797
Последний ответ 05.06.2020, 20:36:42
от safronoff343
Ошибка #1050 при переносе базы данных на хостинг

Автор Ksen

Ответов: 7
Просмотров: 23227
Последний ответ 16.03.2020, 17:47:29
от Petrovich
При попытке войти в админку 404 ошибка компонента

Автор omezik

Ответов: 4
Просмотров: 2399
Последний ответ 31.08.2019, 22:41:46
от Taatshi
Ошибка в компоненте CKForms

Автор Vas80

Ответов: 9
Просмотров: 1300
Последний ответ 22.04.2019, 13:34:48
от sivers
Ошибка Fatal error: Allowed memory size of 73400320 bytes exhausted

Автор Andre109

Ответов: 1
Просмотров: 1741
Последний ответ 03.12.2018, 01:29:56
от voland