友好URL不适用于HTTPS


Friendly URL does not work with HTTPS

  • 如果我打开链接http://www.example.com/friednly-url/有效
  • 如果我打开链接https://www.example.com/friednly-url/投掷404错误
  • 如果我打开链接https://www.example.com/file.php有效

我的.htaccess文件如下所示:

RewriteEngine on
RewriteCond %{HTTP_HOST} ^www.example.com$
RewriteCond %{HTTP_HOST} ^example'.com$ [NC]
RewriteRule ^(.*)$ http://www.example.com/$1 [R=301,L]
Rewriterule  ^(friendly-url)  index.php?file=first&cat_id=0,01

我错过什么了吗?我不知道为什么我不能用HTTPS打开友好的Url。

找到了一个解决方案。我只是忘记添加一些选项到虚拟主机文件:<virtualhost *:433>文件:

<Directory /var/www/html/example.com/public_html>
                Options +Indexes +FollowSymLinks -MultiViews
                AllowOverride All
                Order allow,deny
                allow from all
</Directory>