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

cantsave

  • Захожу иногда
  • 215
  • 2 / 0
Не хочет работать mod_rewrite
« : 25.08.2011, 10:30:47 »
Включить SEO                    (Да)
Использовать mod_rewrite    (Да)
Добавить суффикс к URL      (Да)

Хостинг apache поддерживает.

htaccess.txt переименовал на .htaccess

В .htaccess ничего не трогал.

Ссылку становится нормальным (http://www.ops-sakha.ru/ru/photogallery.html), но выдает ошибку 404.
Когда после http://www.ops-sakha.ru/ добавляю index.php работает.

В чем может быть проблема?
« Последнее редактирование: 25.08.2011, 10:33:53 от cantsave »
*

cantsave

  • Захожу иногда
  • 215
  • 2 / 0
Re: Не хочет работать mod_rewrite
« Ответ #1 : 25.08.2011, 10:34:00 »
##
# @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

RewriteEngine On

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


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

Taatshi

  • Глобальный модератор
  • 5259
  • 481 / 2
  • Верстаем и кодим. Обращайтесь ;)
Re: Не хочет работать mod_rewrite
« Ответ #2 : 25.08.2011, 10:34:36 »
Снимите галочку с Добавить суффикс. Это и есть ваш индекс PHP.
ВЕРСТКА, САЙТЫ ПОД КЛЮЧ, УДАЛЕНИЕ ВИРУСОВ, МИГРАЦИЯ НА JOOMLA 3, ОБНОВЛЕНИЕ  |  ОТЗЫВЫ 
Связь: telegram - Taatshi, почта - Taatshi на яндексе, Skype - Taatshi
*

cantsave

  • Захожу иногда
  • 215
  • 2 / 0
Re: Не хочет работать mod_rewrite
« Ответ #3 : 25.08.2011, 10:37:27 »
Снимите галочку с Добавить суффикс. Это и есть ваш индекс PHP.

Ничего не изменилось
*

Taatshi

  • Глобальный модератор
  • 5259
  • 481 / 2
  • Верстаем и кодим. Обращайтесь ;)
Re: Не хочет работать mod_rewrite
« Ответ #4 : 25.08.2011, 10:44:54 »
А изменения сохранили? Кеш почистили?
ВЕРСТКА, САЙТЫ ПОД КЛЮЧ, УДАЛЕНИЕ ВИРУСОВ, МИГРАЦИЯ НА JOOMLA 3, ОБНОВЛЕНИЕ  |  ОТЗЫВЫ 
Связь: telegram - Taatshi, почта - Taatshi на яндексе, Skype - Taatshi
*

cantsave

  • Захожу иногда
  • 215
  • 2 / 0
Re: Не хочет работать mod_rewrite
« Ответ #5 : 25.08.2011, 10:46:41 »
А изменения сохранили? Кеш почистили?

Да, делал
« Последнее редактирование: 25.08.2011, 10:51:23 от cantsave »
*

cantsave

  • Захожу иногда
  • 215
  • 2 / 0
Re: Не хочет работать mod_rewrite
« Ответ #6 : 25.08.2011, 10:48:23 »
Может надо в .htaccess -е надо че-то замутить?
*

cantsave

  • Захожу иногда
  • 215
  • 2 / 0
Re: Не хочет работать mod_rewrite
« Ответ #7 : 25.08.2011, 11:34:27 »
.htaccess сделал так


Options +FollowSymLinks

RewriteEngine On

RewriteCond %{QUERY_STRING} mosConfig_[a-zA-Z_]{1,21}(=|\%3D) [OR]
RewriteCond %{QUERY_STRING} base64_encode[^(]*\([^)]*\) [OR]
RewriteCond %{QUERY_STRING} (<|%3C)([^s]*s)+cript.*(>|%3E) [NC,OR]
RewriteCond %{QUERY_STRING} GLOBALS(=|\[|\%[0-9A-Z]{0,2}) [OR]
RewriteCond %{QUERY_STRING} _REQUEST(=|\[|\%[0-9A-Z]{0,2})
RewriteRule .* index.php [F]

RewriteBase /

RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}]
RewriteCond %{REQUEST_URI} !^/index\.php
RewriteCond %{REQUEST_URI} (/[^.]*|\.(php|html?|feed|pdf|raw))$ [NC]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule .* index.php [L]
*

cantsave

  • Захожу иногда
  • 215
  • 2 / 0
Re: Не хочет работать mod_rewrite
« Ответ #8 : 25.08.2011, 12:01:57 »
Все, тема закрыта. Оказывается хостер не включил mod_rewrite. Сам проверил их апаче, если бы я не проверял, то сколько недель ломал б голову :)
*

switch

  • Захожу иногда
  • 128
  • 0 / 1
Re: Не хочет работать mod_rewrite
« Ответ #9 : 22.12.2011, 11:50:31 »
Аналогичная проблема



Joomla 1.5
Включить SEO - вкл
Необходимо включить ЧПУ - Использовать mod_rewrite (Мне необходимо для того, чтоб создавались правильные ссылки!)

Для этого в .htaccess добавлено такие строки

DirectoryIndex index.php
RewriteEngine On
RewriteBase /

Но после активации, пишет страница не найдена

Сайт http://obu4enie.kiev.ua/


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

Вдруг перестают работать ссылки меню при включенном SEF

Автор natashalina

Ответов: 2
Просмотров: 1736
Последний ответ 14.12.2017, 09:59:54
от natashalina
Обновился до apache 2.4.10 перестала работать SEF (ЧПУ)

Автор Бармен

Ответов: 3
Просмотров: 1414
Последний ответ 15.12.2016, 14:02:38
от Бармен
Перестают работать ссылки после включения mod_rewrite

Автор ramo

Ответов: 5
Просмотров: 7382
Последний ответ 06.06.2016, 22:54:27
от poopkin
Красивые ЧПУ с помощью mod_rewrite и rewrite.php

Автор Tobi_108

Ответов: 0
Просмотров: 1824
Последний ответ 03.02.2016, 12:24:49
от Tobi_108
После перехода на VPS перестал работать плагин

Автор sixtinn

Ответов: 0
Просмотров: 1295
Последний ответ 14.03.2015, 00:31:42
от sixtinn