Новости Joomla

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

doroga81

  • Осваиваюсь на форуме
  • 12
  • 0 / 0
Не могу избавиться от дублирования страниц со слешем и без слеша.
Если устанавливаю переадресацию на слеш, то дает сбой корзина. При оформлении заказа выдается "ошибка данных".
При редиректе на "без слеша" корзина работает, но при переходе в панель администратор выдает ошибку 404.
У кого есть образец файла .htaccess и robots.txt где и от дублирования можно избавиться и багов нет?
Joomla 2.5 Джумшоппинг  Version 3.16.0
*

threemonkeys

  • Захожу иногда
  • 171
  • 1 / 0
http://joomlaforum.ru/index.php/topic,318828.0.html
Тут на БЕЗ слеш
метод рабочий, тот что надо прописать в htaccess

задайте алиасы товарам и категориям.
*

doroga81

  • Осваиваюсь на форуме
  • 12
  • 0 / 0
http://joomlaforum.ru/index.php/topic,318828.0.html
Тут на БЕЗ слеш
метод рабочий, тот что надо прописать в htaccess

задайте алиасы товарам и категориям.

Если Вы про этот код,
Код
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{QUERY_STRING} ^$
RewriteRule ^(.+)/$ /$1 [R=301,L]
то не подходит, потому что тогда при переходе на
http://dutyfreeshop.com.ua/administrator/
выскакивает ошибка  404
Есть образец  рабочего .htaccess?
Может у меня один редирект конфликтует с другим?
Код


##
# @package Joomla
# @copyright Copyright (C) 2005 - 2014 Open Source Matters. All rights reserved.
# @license GNU General Public License version 2 or later; see LICENSE.txt
##

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



##
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{QUERY_STRING} ^$
RewriteRule ^(.+)/$ /$1 [R=301,L]
##
RewriteRule .* index.php
    RewriteEngine On
    RewriteBase /
    RewriteCond %{HTTP_HOST} ^www.dutyfreeshop.com.ua [NC]
    RewriteRule ^(.*) http://dutyfreeshop.com.ua/$1 [L,R=permanent]
#
# redirect s index.php na glavnuy na4alo
RewriteCond %{THE_REQUEST} !^POST
RewriteCond %{THE_REQUEST} ^[A-Z]{3,9}\ /index\.php\ HTTP/
RewriteCond %{SERVER_PORT}>s ^(443>(s)|[0-9]+>s)$
RewriteRule ^index\.php$ http%2://dutyfreeshop.com.ua/ [R=301,L]
# redirect s index.php na glavnuy konec
##
# dobavlyaem slash v konce     start
                                  
#RewriteCond %{REQUEST_URI} (.*/[^/.]+)($|\?)
#RewriteRule .* %1/ [R=301,L]
####

#RewriteBase /
#RewriteCond %{REQUEST_FILENAME} !-f
#RewriteCond %{REQUEST_URI} !(.*)/$
#RewriteRule ^(.*[^/])$ $1/ [L,R=301]
#dobavlyaem slash v konce     end


# ubiraem slash v konce     start
#RewriteCond %{REQUEST_FILENAME} !-d
#RewriteCond %{REQUEST_URI} ^(.+)/$
#RewriteRule ^(.+)/$ /$1 [R=301,L]
# ubiraem slash v konce     end

## End - Joomla! core SEF Section.

« Последнее редактирование: 21.10.2015, 14:05:21 от doroga81 »
Чтобы оставить сообщение,
Вам необходимо Войти или Зарегистрироваться
 

Редирект для страницы с добавлением кода языка

Автор zeus07

Ответов: 0
Просмотров: 769
Последний ответ 26.06.2023, 11:25:10
от zeus07
Htaccess и редирект с index.php на без index.php

Автор PavelK

Ответов: 2
Просмотров: 2869
Последний ответ 11.05.2023, 14:31:40
от PaLyCH
Как настроить редирект через маску содержащую часть пути?

Автор Slava77

Ответов: 0
Просмотров: 1218
Последний ответ 18.01.2023, 03:17:15
от Slava77
Редирект - исключение из правил (слэш)

Автор darkghost

Ответов: 0
Просмотров: 1229
Последний ответ 26.08.2022, 12:54:19
от darkghost
Редирект - JShop - слеш в конце URL

Автор darkghost

Ответов: 17
Просмотров: 1720
Последний ответ 16.08.2022, 15:18:30
от darkghost