为了账号安全,请及时绑定邮箱和手机立即绑定

Apache 301重定向和保留发布数据

Apache 301重定向和保留发布数据

元芳怎么了 2019-12-04 10:47:46
我已经使用Apache 301重定向实现了SEO URL,该URL重定向到网站根目录中的“ redirect.cfm”,该URL处理所有URL构建和内容交付。301重定向期间,发布数据丢失。到目前为止,仍未找到解决方案,已尝试从重写中排除post方法-最坏的情况是我们可以将旧类型的URL用于post方法。有什么可以做的吗?
查看完整描述

3 回答

?
杨__羊羊

TA贡献1943条经验 获得超7个赞

使用a 307应该正是您想要的


307 Temporary Redirect (since HTTP/1.1)

In this case, the request should be repeated with another URI; however, future requests

should still use the original URI.[2] In contrast to how 302 was historically implemented,

the request method is not allowed to be changed when reissuing the original request. For

instance, a POST request should be repeated using another POST request


查看完整回答
反对 回复 2019-12-04
?
交互式爱情

TA贡献1712条经验 获得超3个赞

使用301重定向进行一般URL重写不是走的路。这是一个性能问题(尤其是对于移动设备,但通常也是这样),因为它会使您的页面请求数量翻倍。


考虑使用诸如Tuckey URLrewriteFilter或apache之类的URL重写工具mod_rewrite。


雷说的都是真的,这只是对您的一般方法的另一条评论。


查看完整回答
反对 回复 2019-12-04
  • 3 回答
  • 0 关注
  • 549 浏览
慕课专栏
更多

添加回答

举报

0/150
提交
取消
意见反馈 帮助中心 APP下载
官方微信