.htaccess htaccess url重写和https

.htaccess htaccess url重写和https,.htaccess,https,url-rewriting,.htaccess,Https,Url Rewriting,我有一个以前在服务器上为http地址设置的网站。 现在我改变了服务器,网站应该是https 因此,我决定对.htaccess文件进行更改,但它不起作用(错误为500,网页不显示) 以下是我的htaccess文件内容: Options +FollowSymLinks RewriteEngine On RewriteBase / RewriteCond %{HTTPS} off #allow to add "www." if missing Rewrite

我有一个以前在服务器上为http地址设置的网站。 现在我改变了服务器,网站应该是https

因此,我决定对.htaccess文件进行更改,但它不起作用(错误为500,网页不显示)

以下是我的htaccess文件内容:

Options +FollowSymLinks 
RewriteEngine On
RewriteBase /

RewriteCond %{HTTPS} off
    
#allow to add "www." if missing
    
RewriteCond %{HTTP_HOST} !^www\.mywebsite\.com [NC]
RewriteCond %{HTTP_HOST} !^$
RewriteRule ^/?(.*) https://www.mywebsite.com/$1 [L,R,NE]

php_flag "allow_url_fopen" "On"

# URL rewrites

   RewriteRule ^home$  /index.php?content=home&lang=en [L]
   RewriteRule ^home-notice-1$  /index.php?content=home&val=1&lang=en [L]
   RewriteRule ^home-notice-2$  /index.php?content=home&val=2&lang=en [L]
   RewriteRule ^home-notice-3$  /index.php?content=home&val=3&lang=en [L]
   RewriteRule ^featured-news$  /index.php?content=news&mode=featured&lang=en [L]            
   etc...
有人能告诉我怎么了吗? 基本上,与之前相比,我所做的更改是添加了“RewriteCond%{HTTPS}off”并将“RewriteRule^/?(.)http:…”更改为“RewriteRule^/?(.)HTTPS:…”。 当然,“mywebsite.com”是我网站真实名称的占位符,显然我输入的是正确的

以下是ftp客户端的结构:

从root到index.php:

->rb4t7.ftp.mywebhost.com
    ->sites (folder)
        ->mywebsite.com (folder)
             .htaccess (file)
             index.php (file)
             ...

谢谢

好的,我所要做的就是复制/粘贴下面的“URL重写”部分。显然,其他一切都把系统搞乱了。https以某种方式在本地得到了处理。
谢谢你的回答。我没有这个权限。(我想)。这是一个商业远程专有服务器,我似乎只能访问ftp和phpMyAdmin。在ftp客户端中,我可以访问服务器中的各种文件夹,但其中没有一个包含任何记录错误的文件(我将它们全部打开)。有一个名为“ik日志”的文件夹,即使在刷新之后也是空的。