2

私は同様の問題を抱えています私のURLはname.domain.com/subdoamin/store/index.phpのようなものです...

私の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]

ただし、404 Not foundエラーが発生しています

4

3 に答える 3

2

ストアフォルダがサブドメインフォルダ内にある場合、RewriteBase/ subdomain /store/である必要があります

于 2011-02-13T04:06:07.000 に答える
0

これを掘り下げたところ、 に置き換える必要があることがわかりまし_route_route。これで問題は解決します。

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

ただし、サブドメインまたはフォルダーの RewriteBase が必要です。

于 2011-10-13T09:06:01.437 に答える