.htaccess - 使用 .htaccess 使用哈希重定向 URL

标签 .htaccess

我想将包含哈希的 URL 重定向到另一个 URL。
示例:example.com/#test 应该重定向到 example.com/teste_page
这可以使用 .htaccess 文件完成吗?

最佳答案

是的,可以做到,只需使用 No Escape 标志... [NE,R,L]

关于.htaccess - 使用 .htaccess 使用哈希重定向 URL,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/8185188/

相关文章:

.htaccess - 为什么我的网站 URL 末尾有双斜杠,例如 ://

php - htaccess 将index.php重写为.html

.htaccess - 301 重定向到 https ://not https://www 上的新域

php - 在 URL 中显示 ID 号并将 ID 号中的数据库结果提取到文本字段中

.htaccess - 如何仅压缩 Apache 提供的 150 字节以上的文档?

apache - 使用 .htaccess 时出现 seo 友好 url 错误

php - Mod 重写 Htaccess 来伪造目录

.htaccess - RewriteRule 正在重定向到绝对路径,而不是正确的 URL

php - 正则表达式匹配.htaccess中的一系列文件类型

.htaccess - 隐藏 .htaccess 中的扩展名