: 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
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?
More posts by @Lengel546
2 Comments
Sorted by latest first Latest Oldest Best
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.
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.
Terms of Use Create Support ticket Your support tickets Stock Market News! © vmapp.org2024 All Rights reserved.