2016-11-28 30 views
0

我是SS中的新成員,我需要將一個網站從一個虛擬主機移到Godaddy。SilverStripe子域的詳細信息頁面正在重定向到根文件夾

爲了做到這一點,我已經在根文件夾中的本地環境中安裝了SS,並且一切正常。然後我去了子域,除了詳細信息頁面外,幾乎一切正常。例如:

主頁:http://subdomain.domain.com.au/subdomain/index.php/ - IT WORKS 產品 - 工具頁:http://subdomain.domain.com.au/subdomain/index.php/products/tools/ - IT WORKS 工具詳情頁:http://subdomain.domain.com.au/tools/show/slp20xp這是行不通的。

如果我去這個網址:http://subdomain.domain.com.au/subdomain/index.php/products/tools//show/slp20xp該頁面在那裏,工作正常。不知何故,在詳細信息頁面上試圖向後退到根文件夾。如果我將此頁面移動到根文件夾,一切正常。

任何想法可能會失蹤?我嘗試了不同的htacces配置,但它們都不起作用。

### 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> 

# This denies access to all yml files, since developers might include sensitive 
# information in them. See the docs for work-arounds to serve some yaml files 
<Files *.yml> 
Order allow,deny 
Deny from all 
</Files> 

ErrorDocument 404 /assets/error-404.html 
ErrorDocument 500 /assets/error-500.html 

<IfModule mod_alias.c> 
RedirectMatch 403 /silverstripe-cache(/|$) 
RedirectMatch 403 /vendor(/|$) 
RedirectMatch 403 /composer\.(json|lock) 
</IfModule> 

<IfModule mod_rewrite.c> 
SetEnv HTTP_MOD_REWRITE On 
RewriteEngine On 
RewriteBase '/' 

RewriteCond %{REQUEST_URI} ^(.*)$ 
RewriteCond %{REQUEST_FILENAME} !-f 
RewriteCond %{REQUEST_URI} !\.php$ 
RewriteRule .* framework/main.php?url=%1&%{QUERY_STRING} [L] 
</IfModule> 
### SILVERSTRIPE END ### 

回答

0

子域中的htaccess的,請嘗試更改RewriteBase '/'RewriteBase '/subdomain'

+0

我已經試過了,但它並沒有正常工作。任何其他想法? – MANUELAN00

相關問題