Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
当您使用 modrewrite 重写您的 url 时,何时发生重写。将鼠标悬停在链接上时,用户能否在重写之前看到 url?当他们将鼠标悬停在链接上时,他们的浏览器会显示重写的 url 还是使用 modrewrite 修改之前的 url?
重写是在服务器中完成的,所以用户永远不会知道,PHP 也不知道它指向的只是脚本文件的链接
mod_rewrite 作用于服务器端,这意味着 apache 在响应请求之前重写传入的 URL。您添加到页面的任何 HTML 链接都将指向您输入的 URL,因为 mod_rewrite 不会修改任何传出数据。
重写发生在 Apache 解析请求时 - 在 PHP 解释器启动之前。