.htaccess - 是否可以处理这样的 URL

标签 .htaccess

http://www.example.com/http://www.test.com

我使用 .htaccess 尝试了许多不同的方法,但没有成功。我需要获取第二个 url 作为参数。是否可以将其重定向到 index.php 并将其作为 $_SERVER["REQUEST_URI"] 或其他方法获取?谢谢

UPD:看起来不可能获得完整的 URL,无法识别问号。理想示例:

127.0.0.1/http://www.test.com/script.php?a=hello&b=world#blabla;par2?%par3 

我需要在我的 index.php 中获取准确的字符串

www.test.com/script.php?a=hello&b=world#blabla;par2?%par3

最佳答案

关于.htaccess - 是否可以处理这样的 URL,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/2923247/

相关文章:

javascript - 当前目录的 404 重定向工作

.htaccess 规则,在 url 中重写 key

.htaccess - nginx 上的细香葱,htaccess

php - Codeigniter 删除 Nginx 上的 index.php

.htaccess - htaccess 内部服务器错误

javascript - 从使用 React 和 Webpack 构建的网站的 url 中删除 .html 扩展名

javascript - 如何避免用户直接在浏览器中打开弹出窗口?

php - $_GET URL 来自 ?url=http ://google. com

php - Mod 重写模式问题

php - 通过 .htaccess 将 .php ext 替换为 .html