Hello people
I am using Apache 2.0.55 Web server as a service on top of Windows machine
I am using PHP as a server side script
During debugging my application locally on 'localhost'
I performed some 301 redirects on some pages.
Now I cannot make Apache forget about these redirects
For example
I used PHP to peform 301 redirect from
http://localhost/test.php?p=1
to
http://localhost/test.php
I now regret this, but everytime I go to http://localhost/test.php?p=1, I am being taken to
http://localhost/test.php
Since this was done locally, I hope there is a way to tell Apache to forget about this changes
Am I right?
Any help would be appreciated
regards
how to manange redirect 301 locally
Moderator: General Moderators
I guess my question wasn't clear enough
I performed the redirect already.
When I go to http://localhost/test.php?p=1, I don't pass through the code that performs
the redirect (I actually put it in comment)
but for some reason I get redirected to http://localhost/test.php
It is as if the browser/web server remember that page http://localhost/test.php?p=1
was permanently redirected to http://localhost/test.php
all I want now is to be able to go to http://localhost/test.php?p=1 without being automatically
redirected to http://localhost/test.php by the browser/apache
any way to do it?
I performed the redirect already.
When I go to http://localhost/test.php?p=1, I don't pass through the code that performs
the redirect (I actually put it in comment)
but for some reason I get redirected to http://localhost/test.php
It is as if the browser/web server remember that page http://localhost/test.php?p=1
was permanently redirected to http://localhost/test.php
all I want now is to be able to go to http://localhost/test.php?p=1 without being automatically
redirected to http://localhost/test.php by the browser/apache
any way to do it?
- tasteslikepurple
- Forum Commoner
- Posts: 46
- Joined: Thu Jan 26, 2006 3:38 am
- Location: Bath, UK
it was cahced because 301 means that the document has permanently moved, therefore there is no point in even going back to the original URI, so the browser remembers that it has to go to the new one (if that makes sense)jasongr wrote:thanks, that indeed solved the problem
It was cached in the browser.
I thought that it was apache that was responsible, but I was wrong
i.e. you said to the browser that http://localhost/test.php?p=1 no longer exists and that it must go to http://localhost/test.php instead, so it just saves time by caching the 301 redirects. you could try a 302 redirect instead for developement work