I have a web directory localhost/web/folder1/folder2/
When I make a link <a href="login.php">
in the folder2, then the result is localhost/web/folder1/folder2/login.php
How rewrite display name of folder2 localhost/web/folder1/folder2/login.php to localhost/web/folder1/new_folder2/login.php without canged <a href="login.php">
?
答案 0 :(得分:1)
我不确定我是否理解您的问题,但您是否尝试使用<a href="../new_folder2/login.php">
之类的内容?您可能根本不需要触摸.htaccess,只需使用../
在相对目录路径上向上一级。
如果您特别想要.htaccess来处理这个问题,请查看this post如何重写文件夹名称。