【发布时间】:2014-11-09 04:39:31
【问题描述】:
我们已经为客户端构建了一个 Web 应用程序,它应该在调用某些特定 url 时显示。所有其他 url 应由现有的 Typo3 安装处理。不幸的是,我们无法访问 Apache2 配置,因此我无法访问重写日志或更改 VirtualHost 定义。
.htaccess 看起来大概是这样的:
RewriteEngine On
# http://example.com/sub/foo/
RewriteCond %{REQUEST_URI} ^/sub/foo/.*
RewriteRule .* special.php [L]
# http://example.com/sub/bar/year/2014/
RewriteCond %{REQUEST_URI} ^/sub/bar/.*
RewriteRule .* special.php [L]
# Everything else should be typo3
RewriteRule .* general.php [L]
但是,所有呼叫都被路由到general.php 文件。根据this page,.htaccess 应该按预期工作。服务器是 Apache 2.2。
有什么想法吗?
【问题讨论】:
标签: apache .htaccess mod-rewrite