Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Apache 301 Redirect and preserving post data

I have implemented SEO URLs using Apache 301 redirects to a 'redirect.cfm' in the root of the website which handles all URL building and content delivering.

Post data is lost during a 301 redirect.

Unable to find a solution so far, have tried excluding post method from rewrites - worst case scenario we could use the old type URLs for post methods.

Is there something that can be done?

Thanks

like image 474
Daniel Cook Avatar asked Nov 29 '12 15:11

Daniel Cook


People also ask

Which is better 301 or 302 redirect?

HTTP redirect code 301—a 301 redirect for short—is best for SEO if you've moved content permanently. If you've moved content temporarily, a 302 redirect is best.

Which among one among 301 and 302 redirect is permanent and temporary redirect?

A 301 redirect means that the page has permanently moved to a new location. A 302 redirect means that the move is only temporary. Search engines need to figure out whether to keep the old page, or replace it with the one found at the new location.

When would it be necessary to301 redirect every page on a site?

301 redirects should be used when a page is no longer relevant, useful or has been removed. They are also really valuable for site rebuilds, where URLs are tidied up into the newer, cleaner pages. It is very important to redirect any old URLs that won't be staying the same on a rebuild of your website.


1 Answers

Using a 307 should be 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 

- Wikipedia

like image 197
Hashbrown Avatar answered Sep 20 '22 00:09

Hashbrown