2016-04-15 76 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>