我已經使用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

交互式愛情
TA貢獻1712條經驗 獲得超3個贊
使用301重定向進行一般URL重寫不是走的路。這是一個性能問題(尤其是對于移動設備,但通常也是這樣),因為它會使您的頁面請求數量翻倍。
考慮使用諸如Tuckey URLrewriteFilter或apache之類的URL重寫工具mod_rewrite。
雷說的都是真的,這只是對您的一般方法的另一條評論。
- 3 回答
- 0 關注
- 615 瀏覽
添加回答
舉報
0/150
提交
取消