【发布时间】:2013-10-08 13:27:42
【问题描述】:
我想从localhost/test 重定向用户 --> localhost/new/test/index.php
但是用户应该在地址栏中看到localhost/test,尽管内容是从 localhost/new/test 获取的
如何使用 htaccess 来实现。任何帮助表示赞赏。
隐藏实际 URL 的现有解决方案对我不起作用。请帮助解决这个问题。
我们正在尝试的示例
folder level 1 => localhost/test/index.php
folder level 2 => localhost/new/test/index.php
用户在 URL 中输入localhost/test/index.php,但应该显示localhost/new/test/index.php 的内容而不显示localhost/new/test/index.php
用户仍应看到旧 URL localhost/test/index.php
【问题讨论】:
-
请提供您迄今为止尝试过的示例。我们可以帮助您改进它们。
标签: apache .htaccess url-rewriting