2016-04-15 32 views
-1

.htaccess文件看起来像这样:友好的URL不适用于HTTPS

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打开友好的网址。

回答

0

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

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