2
我在我的網站上安裝了SSL,但我想要我的SSL證書只在我的主域(不是子域)上工作。 我在我的主域名安裝WordPress的,我在我的子域安裝YetiForce從SSL中排除子域
我用下面的.htaccess文件代碼
RewriteEngine On
RewriteCond %{SERVER_PORT} 80
RewriteRule ^(.*)$ https://vinyl.co.id/$1 [R,L]
# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase/
RewriteCond %{HTTP_HOST} stock.vinyl.co.id
RewriteCond %{REQUEST_URI} !stock/
RewriteRule ^(.*)$ stock/$1 [L]
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>
# END WordPress
但我仍然無法訪問http://stock.vinyl.co.id 請幫我
你好@大衛, 我已經編輯這樣 .htaccess文件RewriteEngine敘述'在 的RewriteCond%{HTTP_HOST} vinyl.co.id 的RewriteCond%{SERVER_PORT} 80 重寫規則^(。*)$ https://vinyl.co.id/$1 [R,L] #BEGIN WordPress的 RewriteEngine敘述在 RewriteBase/ 的RewriteCond%{HTTP_HOST} stock.vinyl.co.id 的RewriteCond%{ REQUEST_URI}!stock/ RewriteRule ^(。*)$ stock/$ 1 [L] RewriteRule^index \ .php $ - [L] RewriteCond%{REQUEST_FILENAME}!-f RewriteCond%{REQUEST_FILENAME}!-d RewriteRule。的index.php [L] #END WordPress' 我仍然得到服務器沒有找到 –
incubusholic
你能啓用重寫模塊([RewriteLog和RewriteLogLevel](調試日誌https://httpd.apache.org /docs/2.2/mod/mod_rewrite.html#rewritelog)爲apache 2.2, [LogLevel](https://httpd.apache.org/docs/2.4/mod/mod_rewrite.html#logging)爲apache 2.4)和編輯你的問題與他們? –