Mobile app version of vmapp.org
Login or Join
Lengel546

: Prevent 301 redirect in browser to enable developer access to a website We have 301 redirect set from domain A to domain B. Domain A contains a working site. Is there a way to disable 301

@Lengel546

Posted in: #301Redirect #Browsers #Redirects

We have 301 redirect set from domain A to domain B. Domain A contains a working site.

Is there a way to disable 301 redirect in a browser so that when we come to domain A, we (the programmers/tester) stay on domain A and are not redirected?

10.02% popularity Vote Up Vote Down


Login to follow query

More posts by @Lengel546

2 Comments

Sorted by latest first Latest Oldest Best

 

@BetL925

It is not possible to do anything in your browser to prevent the redirect. The redirect is sent by the server and the browser has no facility to ignore it. Once the server sends the redirect, it does not send additional content. When you put the redirect in place, it instructs the server to shut down your website. Your "working" website no longer is functional.

As Martijn suggests in his answer you could configure the server to not issue the redirect for specific IP addresses. You could also use cookies that instruct the server not to issue the redirect in certain cases.

10% popularity Vote Up Vote Down


 

@Chiappetta492

You can't stop the redirect in your browser. You could stop it, but you won't get domain A.
Simply add this line as condition, but with the ip (or ip's) you want, excluding yourself from the redirect:

RewriteCond %{REMOTE_ADDR} !^11.222.33.444 [OR]
RewriteCond %{REMOTE_ADDR} !^11.222.33.445


This way you can test the site, or do whatever you want to it, while the rest of the world sees the other version.

10% popularity Vote Up Vote Down


Back to top | Use Dark Theme