2011-02-01 3 views
2
내가 내 URL이 name.domain.com/subdoamin/store/index.php처럼 비슷한 문제에 봉착

...Opencart htaccess로 문제

내 htaccess로 파일은 다음과 같습니다

Options +FollowSymlinks 

# Prevent Directoy listing 
Options -Indexes 

# Prevent Direct Access to files 
<FilesMatch "\.tpl"> 
Order deny,allow 
Deny from all 
</FilesMatch> 

#<FilesMatch "\.ini"> 
#Order deny,allow 
#Deny from all 
#</files> 

# SEO URL Settings 
RewriteEngine On 
RewriteBase /store/ 
RewriteCond %{REQUEST_FILENAME} !-f 
RewriteCond %{REQUEST_FILENAME} !-d 
#RewriteRule ^(.*)\?*$ index.php?_route_=$1 [L,QSA] 
RewriteRule ^(.*) index.php [L,QSA] 
상점 폴더가 있어야합니다 을 RewriteBase 당신의 하위 도메인 폴더 안에있는 경우

그러나 그것은 404 Not found 오류

+0

유사한 문제? – random

답변

2

을주고있다 /하위 도메인/저장/

0

나는 이것을 파고 _route_route으로 대체해야한다는 것을 알았습니다. 이렇게하면 문제가 해결됩니다.

RewriteRule ^(.*)\?*$ index.php?_route_=$1 [L,QSA] 
--> RewriteRule ^(.*)\?*$ index.php?route=$1 [L,QSA]` 

이지만 RewriteBase는 하위 도메인 또는 폴더가 필요합니다.

+1

그게 실제로 맞지 않습니다. '_route_'는 재 작성된 URL을 디코딩 할 때 필요합니다. –

1

내 하위 도메인은 root/main site/test 사이트에 있습니다. admin-> system-> 설정에서 올바른 URL 경로를 제공해야합니다. .htaccess 파일이 수정 된 날,

RewriteRule^([^?] *) index.php? 경로 = $ 1 [L, QSA]

한다 RewriteCond % {REQUEST_URI}!^것에/실험 사이트 /.*$