gpt4 book ai didi

.htaccess - 没有 https 的类别和 url 重定向到 magento 中的主页

转载 作者:太空宇宙 更新时间:2023-11-03 14:05:02 25 4
gpt4 key购买 nike

我们在我们的网站中启用了 https,并在管理部分启用了 301。但问题在于类别或产品网址

例子:我有 https://www.boxdoccia.it/box-doccia/box-doccia-angolari/ , 当更改为 http://www.boxdoccia.it/box-doccia/box-doccia-angolari/返回首页

Magento 1.7.0.2- 多个商店(ssl 仅适用于 boxdoccia.it)

-自动重定向到基本 URL -> 是 301

-安全和不安全的 url -> https://www.boxdoccia.it

这是 htaccess:

<IfModule mod_ssl.c>

############################################

## make HTTPS env vars available for CGI mode

SSLOptions StdEnvVars

</IfModule>

<IfModule mod_rewrite.c>

############################################

## enable rewrites

Options +FollowSymLinks

RewriteEngine on

############################################


## workaround for HTTP authorization

## in CGI environment


RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}]


############################################

## TRACE and TRACK HTTP methods disabled to prevent XSS attacks


RewriteCond %{REQUEST_METHOD} ^TRAC[EK]

RewriteRule .* - [L,R=302]

############################################

## always send 404 on missing files in these folders

RewriteCond %{REQUEST_URI} !^/(media|skin|js)/

############################################

## never rewrite for existing files, directories and links

RewriteCond %{REQUEST_FILENAME} !-f

RewriteCond %{REQUEST_FILENAME} !-d

RewriteCond %{REQUEST_FILENAME} !-l


############################################

## rewrite everything else to index.php

RewriteRule .* index.php [L]

</IfModule>

############################################

## Prevent character encoding issues from server overrides

## If you still have problems, use the second line instead

AddDefaultCharset Off

#AddDefaultCharset UTF-8

FileETag none

#####

RewriteCond %{HTTP_HOST} ^(.*)boxdoccia.it
RewriteRule ^ - [E=MAGE_RUN_CODE:boxdoccia_it]
RewriteCond %{HTTP_HOST} ^(.*)boxdoccia.it
RewriteRule ^ - [E=MAGE_RUN_TYPE:website]
RewriteCond %{HTTP_HOST} ^(.*)allandmore.com
RewriteRule ^ - [E=MAGE_RUN_CODE:allandmore_com]
RewriteCond %{HTTP_HOST} ^(.*)allandmore.com
RewriteRule ^ - [E=MAGE_RUN_TYPE:website]
RewriteCond %{HTTP_HOST} ^(.*)piattodoccia.it
RewriteRule ^ - [E=MAGE_RUN_CODE:piattodoccia_it]
RewriteCond %{HTTP_HOST} ^(.*)piattodoccia.it
RewriteRule ^ - [E=MAGE_RUN_TYPE:website]

最佳答案

之后试试这个 RewriteRule.* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}]

RewriteCond %{HTTPS} off
RewriteRule ^(.*)$ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]

关于.htaccess - 没有 https 的类别和 url 重定向到 magento 中的主页,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/43783771/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com