我已经实现了搜索引擎优化网址使用Apache 301重定向到一个'redirect.cfm‘在根的网站,它处理所有网址建设和内容交付。
Post数据在301重定向期间丢失。
到目前为止找不到解决方案,已经尝试从重写中排除post方法-最坏的情况我们可以使用post方法的旧类型URL。
有什么可以做的吗?
谢谢
发布于 2014-02-17 13:10:55
使用307
应该是exactly what you want
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
发布于 2013-06-19 20:19:43
使用301重定向进行常规URL重写不是可行的方法。这是一个性能问题(特别是对于移动设备,但在一般情况下也是如此),因为它会使页面的请求数量加倍。
考虑使用URL重写工具,如Tuckey的URLrewriteFilter
或apache mod_rewrite
。
Ray所说的都是真的,这只是对你的一般方法的补充。
https://stackoverflow.com/questions/13628831
复制相似问题