RewriteEngine On
RewriteCond %{HTTP_HOST} ^jlcustompc.com [NC]
RewriteRule ^(.*)$ https://www.jlcustompc.com/$1 [L,R=301]
RewriteEngine On
RewriteCond %{HTTP_HOST} ^jlcustompc.net$ [OR]
RewriteCond %{HTTP_HOST} ^www.jlcustompc.net$
RewriteRule (.*)$ https://www.jlcustompc.com/$1 [R=301,L]
RedirectMatch 301 /contactform.php /buymypc.php
AddType application/x-httpd-php .html
AddType application/x-httpd-php .htm
RewriteCond %{HTTP_USER_AGENT} libwww-perl.* [NC,OR]
RewriteCond %{QUERY_STRING} ^(.*)=http [NC]
RewriteRule ^(.*)$ – [F,L]
我想jlcustompc.net重定向到https://www.jlcustompc.comhtaccess的 - 301重定向問題
這就是我遇到的唯一問題。此外,如果還有其他東西可以添加或替換或修改,請告訴我。
以下是我剛剛設置的虛擬主機,似乎沒有按預期工作。
我知道的第一個主機毫無疑問是有效的。
<VirtualHost MYIP:443>
ServerAdmin [email protected]
DocumentRoot "ROOT"
ServerName www.jlcustompc.com
ErrorLog ERRORLOG
SSLEngine on
SSLProtocol all
SSLCertificateFile "PATH"
SSLCertificateKeyFile "PATH"
SSLCACertificateFile "PATH"
ServerPath "PATH"
<Directory "PATH">
</Directory>
</VirtualHost>
<VirtualHost MYIP:443>
ServerAdmin [email protected]
DocumentRoot "PATH"
ServerName www.jlcustompc.net
ErrorLog ERRORLOG
SSLEngine on
SSLProtocol all
SSLCertificateFile "PATH"
SSLCertificateKeyFile "PATH"
SSLCACertificateFile "PATH"
ServerPath "PATH"
<Directory "PATH">
</Directory>
</VirtualHost>
<VirtualHost MYIP:80>
ServerAdmin [email protected]
DocumentRoot "PATH"
ServerName www.jlcustompc.net
ErrorLog ERRORLOG
ServerPath "PATH"
<Directory "PATH">
</Directory>
</VirtualHost>
<VirtualHost MYIP:80>
ServerAdmin [email protected]
DocumentRoot "PATH"
ServerName www.jlcustompc.com
ErrorLog ERRORLOG
ServerPath "PATH"
<Directory "PATH">
</Directory>
</VirtualHost>
這是什麼問題?這些規則看起來很好。 – 2012-08-13 01:41:35
jlcustompc.net根本不會重定向,但www.jlcustompc.net確實----當我檢查www.jlcustompc.net的重定向時,使用重定向工具發現錯誤不存在。不僅如此,但我想jlcustompc.net/*.*重定向到https://www.jlcustompc.com ----基本上任何.net需要重定向到我的主頁.com – 2012-08-13 02:03:10