問題描述
我已經模仿 Otto’s 設定在這裡:http://ottopress.com/2011/creating-a-wordpress-site-using-svn/和我的簡要例子如下。
該教程特定於單個站點安裝,並指定單個域。如何自定義 htaccess 以適合多站點?請注意,多站點 htaccess WordPress 提供不起作用,因為 wp 目錄是自定義的。
目錄設定
-
C:wampwwwmy_site– 站點根 -
C:wampwwwmy_sitewp-config.php– 配置 -
C:wampwwwmy_sitewp– WordPress 作為 SVN 外部 -
C:wampwwwmy_sitecustom-content– 自定義內容目錄
Apache 安裝程式
<VirtualHost 127.0.0.1>
ServerName example.com
DocumentRoot "C:/wamp/www/my_site"
ServerAdmin me@example.com
<Directory C:/wamp/www/my_site>
Order Allow,Deny
Allow from all
</Directory>
</VirtualHost>
htaccess 的
Options -Indexes
RewriteEngine on
RewriteCond %{HTTP_HOST} ^(www.)?example.com$
RewriteCond %{REQUEST_URI} !^/wp/
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ /wp/$1
RewriteCond %{HTTP_HOST} ^(www.)?example.com$
RewriteRule ^(/)?$ wp/index.php [L]
最佳解決方案
現在,根據馬克·賈基斯 (as noted here) 的說法,這是無法解決的。
Q: Does this support WordPress in multisite mode?
A: No. Not until WordPress supports WordPress-in-a-subdirectory installation for multisite. If you’re a WordPress hacker who wants to help with that feature, drop me a line
參考文獻
注:本文內容整合自 Google/Baidu/Bing 輔助翻譯的英文資料結果。如果您對結果不滿意,可以加入我們改善翻譯效果:薇曉朵技術論壇。