我使用的1and1作爲一個虛擬主機,我被告知,爲了能夠爲我的網站https的,我需要將下面的行添加到.htaccess文件的.htaccess配置不當的問題
RewriteEngine On
RewriteBase/
RewriteCond %{HTTP_HOST} !^www\ooples.com\.com$ [NC]
RewriteRule ^(.*)$ https://www.ooples.com/$1 [R=301,L]
我目前有我的網站的目標設置爲網絡空間的文件夾/ Ooples這就是我目前的.htaccess文件看起來像後,我所做的更改:
############################################
## enable rewrites
Options +SymLinksIfOwnerMatch
RewriteEngine on
############################################
## you can put here your magento root folder
## path relative to web root
RewriteBase /Ooples
RewriteCond %{HTTP_HOST} !^www\ooples.com\.com$ [NC]
RewriteRule ^(.*)$ https://www.ooples.com/$1 [R=301,L]
這是我第一次編輯.htaccess文件,當我去我的網站,我得到一個500內部服務器錯誤。有誰知道我做錯了什麼?
RewriteBase/
RewriteCond %{HTTP_HOST} ooples\.com [NC]
RewriteCond %{HTTPS} off
RewriteRule ^(.*)$ https://www.ooples.com/$1 [R=301,L]
該規則錯誤,並且啓用https無法通過編輯.htaaccess –