php - 使用查询字符串和 anchor 标签形成正确的 URL

标签 php wordpress url standards url-fragment

当查询字符串和 anchor 标记(哈希标记)在 URL 中都可见时,它们出现的正确顺序是什么?

http://www.whatever.com?var=val#anchor

http://www.whatever.com#anchor?var=val

有这方面的文档吗?

这些 URL 正在由 WordPress/PHP 处理。

最佳答案

?var=var#hash

# 之后的所有内容都是客户端。

另外,请查看 URL rewriting摆脱丑陋的 ?var=var.

关于php - 使用查询字符串和 anchor 标签形成正确的 URL,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/12682952/

相关文章:

php - 使用 PHP 生成 JSON

php - Laravel - 设置关系模型的默认值

php - 站点错误 - session_start() [<a href ='function.session-start' >

php - MySQL 字段不能为空错误,尽管字段应该允许值为空

html - Zend_View_Helper_Navigation_Menu 创建了一个我没想到的 url

PHP/SQL/WordPress : Group a user list by alphabet

facebook - OAuth2 新手 - 从 WordPress 插件发布到 Facebook 墙

php - 如何缓存 Wordpress 中的 HTML 页面以避免查询数据库?

css - codeigniter Controller 和 controller/之间有什么区别?

url - 在 Yii 中控制 url : controller/action/id to/id