2
기본적으로, .htaccess를 설정하여 루트 디렉토리에있는 SilverStripe 설치 및/blogs 디렉토리에 설치된 블로그에서 작동하도록해야합니다. 여기에 내가 무엇을 가지고 있습니다 :.htaccess with SilverStripe and WordPress
### 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
Ok, 대부분 작동합니다. 예를 들어, 모든 SilverStripe 항목은 정상적으로 보입니다. permalinked 카테고리 및 게시물 괜찮습니다. 그러나 초기 index.php를 제외하고 블로그 하위 디렉토리에있는 실제 PHP 파일에 액세스하는 것은 작동하지 않습니다 (예 : ../blogs/aquiman/wp-login.php가 작동하지 않음). CSS 페이지를 찾지 못하는 것 같습니다. 이견있는 사람? –
나는 그것을 뒤로 가져 간다. 나는 블로그가 오래되었던 캐시되었던 버전을보고 있었다고 생각한다. blogs 하위 디렉토리에서는 아무 것도 작동하지 않습니다. –
ok'$ DOCUMENT_ROOT/.htaccess'에서 편집 한 코드를 사용해주세요. – anubhava