【发布时间】:2013-07-15 09:32:45
【问题描述】:
我们有以下设置:
webroot 包含两个目录。一个用于 Magento,一个用于 TYPO3。
我有一个额外的 ht.access 应该重写一些 url 以使用 TYPO3。其他一切都应该交给 Magento。这个 htaccess 看起来像这样:
<IfModule mod_rewrite.c>
Options -Indexes
Follow Symlinks
Options +FollowSymLinks
Enable URL rewriting
RewriteEngine On
RewriteRule ^$ /cms/index.php [L]
RewriteRule ^kurse(.*)$ /cms/index.php [L]
RewriteRule ^service(.*)$ /cms/index.php [L]
RewriteRule ^kontakt(.*)$ /cms/index.php [L]
RewriteRule ^informationen(.*)$ /cms/index.php [L]
RewriteRule ^typo3$ /cms/typo3/index.php [L]
RewriteRule ^(.*)$ /shop/index.php [L]
</IfModule>
现在,当我调用 url 时,假设 http://host/informationen RealURL 将其重定向到 http://host/cms/rmationen,这会导致“路径段错误”
我也尝试过 / 和 /cms/ 作为 RewriteBase。没有按预期工作。
是否有任何解决方法可以使用一个域实现两个系统?
干杯 马蒂亚斯
【问题讨论】:
-
你想重定向还是重写?
-
我需要重写。出于 SEO 的原因,我不想在 url 中有像“cms”这样的路径段。