【发布时间】:2012-01-13 09:13:14
【问题描述】:
我一直在寻找答案,但没有找到。我在根文件中有 .htaccess,它将 /loremipsum/ 重定向到 index.php?url=loremipsum,但是,它也想在子目录中工作。我有很多,因此将 .htaccess 文件放入每个人都会很痛苦。有没有办法让它只在根文件夹中工作?
【问题讨论】:
-
你使用的规则是什么?
-
Options -MultiViews +FollowSymLinksRewriteEngine OnRewriteRule ^(.+)/$ index.php?url=$1 [L] -
也许将
index.php更改为/index.php?不确定在子目录中工作是什么意思。 -
我的意思是,如果我去 myaddres.com 这是停在同一台服务器上的域,我什至无法访问 index.php,因为 .htaccess 在根文件夹中
标签: .htaccess mod-rewrite redirect