我模仿过Otto\'s 此处设置:http://ottopress.com/2011/creating-a-wordpress-site-using-svn/ 下面是我的简单示例。
该教程特定于单个站点安装,并指定了单个域。How can I customize the htaccess
below to be suitable for multisite? 请注意,多站点htaccess
WordPress提供的不起作用,因为wp
目录是自定义的。
Directory Setup
C:\\wamp\\www\\my_site
- 站点根目录C:\\wamp\\www\\my_site\\wp-config.php
- 配置C:\\wamp\\www\\my_site\\wp
- WordPress作为SVN外部C:\\wamp\\www\\my_site\\custom-content
- 自定义内容目录Apache Setup
<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]