好的,基本上我需要能够设置我的 .htaccess 以便它适用于根目录中的 SilverStripe 安装和 /blogs 目录中安装的博客。这是我所拥有的:
### SILVERSTRIPE START ###
<Files *.ss>
Order deny,allow
Deny from all
Allow from 127.0.0.1
</Files>
<Files web.config>
Order deny,allow
Deny from all
</Files>
ErrorDocument 404 /assets/error-404.html
ErrorDocument 500 /assets/error-500.html
<IfModule mod_alias.c>
RedirectMatch 403 /silverstripe-cache(/|$)
</IfModule>
<IfModule mod_rewrite.c>
SetEnv HTTP_MOD_REWRITE On
RewriteEngine On
# BEGIN Silverstripe
RewriteBase /
RewriteCond %{REQUEST_URI} ^(.*)$
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule .* sapphire/main.php?url=%1&%{QUERY_STRING} [L]
# END Silverstripe
# BEGIN WordPress
RewriteBase /blogs/aquiman/
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /blogs/aquiman/index.php [L]
RewriteBase /blogs/aquipad/
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /blogs/aquipad/index.php [L]
# END WordPress
</IfModule>
### SILVERSTRIPE END ###
这当然行不通。我知道这是错误的,但我知道的还不够多,无法修复它。请帮助我更正此问题以使其正常工作。
谢谢,JH