nginx redirect HTTPS to HTTP

The answer above will work, you need to generate a self signed cert (or have a real one) and configure nginx as such: server { listen *:443; ssl on; server_name domain.com; rewrite ^(.*) http://domain.com$1 permanent; ssl_certificate /data/certs/domain.crt; ssl_certificate_key /data/certs/domain.key; } Keep in mind, if it is a self signed cert the browser will give you … Read more

Setting up redirect in web.config file

Open web.config in the directory where the old pages reside Then add code for the old location path and new destination as follows: <configuration> <location path=”services.htm”> <system.webServer> <httpRedirect enabled=”true” destination=”http://example.com/services” httpResponseStatus=”Permanent” /> </system.webServer> </location> <location path=”products.htm”> <system.webServer> <httpRedirect enabled=”true” destination=”http://example.com/products” httpResponseStatus=”Permanent” /> </system.webServer> </location> </configuration> You may add as many location paths as necessary.

ASP.NET MVC – How to Preserve ModelState Errors Across RedirectToAction?

I had to solve this problem today myself, and came across this question. Some of the answers are useful (using TempData), but don’t really answer the question at hand. The best advice I found was on this blog post: http://www.jefclaes.be/2012/06/persisting-model-state-when-using-prg.html Basically, use TempData to save and restore the ModelState object. However, it’s a lot cleaner … Read more

How do you follow an HTTP Redirect in Node.js?

If all you want to do is follow redirects but still want to use the built-in HTTP and HTTPS modules, I suggest you use https://github.com/follow-redirects/follow-redirects. yarn add follow-redirects npm install follow-redirects All you need to do is replace: var http = require(‘http’); with var http = require(‘follow-redirects’).http; … and all your requests will automatically follow … Read more

URL Fragment and 302 redirects

Update 2014-Jun-27: RFC 7231, Hypertext Transfer Protocol (HTTP/1.1): Semantics and Content, has been published as a PROPOSED STANDARD. From the Changelog: The syntax of the Location header field has been changed to allow all URI references, including relative references and fragments, along with some clarifications as to when use of fragments would not be appropriate. … Read more