我的客户虚拟主机坚持将网站的重写规则放在虚拟主机文件中,但这会导致错误“错误请求”。尽管当我在本地服务器和其他类似站点上的 .htaccess 中放置相同的规则时,它可以完美运行。以下是规则:
RewriteRule ^api/ index_rest.php [L]
RewriteRule ^index_rest.php - [L]
RewriteRule ^([^/]+/)?content/treemenu.* index_treemenu.php [L]
RewriteRule ^var/([^/]+/)?storage/images(-versioned)?/.* - [L]
RewriteRule ^var/([^/]+/)?cache/(texttoimage|public)/.* - [L]
RewriteRule ^design/[^/]+/(stylesheets|images|javascript)/.* - [L]
RewriteRule ^share/icons/.* - [L]
RewriteRule ^extension/[^/]+/design/[^/]+/(stylesheets|flash|images|lib|javascripts?)/.* - [L]
RewriteRule ^packages/styles/.+/(stylesheets|images|javascript)/[^/]+/.* - [L]
RewriteRule ^packages/styles/.+/thumbnail/.* - [L]
RewriteRule ^var/storage/packages/.* - [L]
RewriteRule ^favicon.ico - [L]
RewriteRule ^design/standard/images/favicon.ico - [L]
RewriteRule ^robots.txt - [L]
RewriteRule ^w3c/p3p.xml - [L]
RewriteRule .* index.php
我的主机给了我一个位于此处的错误日志,但我无法确定问题所在。任何帮助是极大的赞赏。