htaccess 访问当前目录之外的内容

发布于 2024-09-28 15:07:37 字数 208 浏览 0 评论 0原文

在我的网络根目录中,我有一个使用 RewriteRule 的 .htaccess,例如:

RewriteRule ^/t/([0-9]+)/$ ../list.php?id=$1 [L]

如果列出,这是否正确.php 是否位于当前文件夹下?我找不到任何关于此的信息,而且它目前不起作用,所以我不确定它是否可能,或者我做错了。

谢谢,

In my web root I have a .htaccess which uses a RewriteRule, for example:

RewriteRule ^/t/([0-9]+)/$ ../list.php?id=$1 [L]

Is this correct if list.php is in the folder below the current one? I can't find any information about this and it's currently not working, so I'm not sure whether it is either possible, or I am doing it wrong.

Thanks,

Dan

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

把回忆走一遍 2024-10-05 15:07:37

第二条路径不关心“当前文件夹”,因为它在主机之后开始。

The second path don't care about "current folder" as it starts after the host.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文