Results 1 to 5 of 5

Thread: Apache 301 Permanent redirect won't stop cancelled

  1. #1
    Join Date
    Mar 2008
    Location
    Oz
    Posts
    11,727
    Blog Entries
    2

    Default Apache 301 Permanent redirect won't stop cancelled

    Hi

    I've got this 301 permanent redirect line in the .htaccess file of domain oldname.com
    Code:
    Redirect 301 /index.html http://newname.com/index.html
    For over a year now when I used this addess in my browser http: //www.oldname.com I got this page http: //www.newname.com/index.html
    And that's what I wanted.
    But now I want to change back.
    So I have now deleted the 301 redirect line from the .htaccess file.
    But the redirect remains active.

    Can you tell me why?

    Thanks
    swerdna
    Leap 42.3 & 15.1(Beta) &KDE
    FYIs from the days of yore

  2. #2
    Join Date
    Jun 2008
    Location
    Netherlands
    Posts
    25,261

    Default Re: Apache 301 Permanent redirect won't stop cancelled

    Restarted Apache?
    Henk van Velden

  3. #3
    Join Date
    Mar 2008
    Location
    Oz
    Posts
    11,727
    Blog Entries
    2

    Default Re: Apache 301 Permanent redirect won't stop cancelled

    The .htaccess file is read each time a call is made to the server, so the apache2 processes don't need to be restarted for the new info in the .htaccess file to be absorbed; i.e. there shouldn't be a need to "rcapache2 restart".

    But your question set me thinking about cached information and it suddenly dawned on me to clear my browser's cache. And voila it worked.

    Thanks for the nudge
    Leap 42.3 & 15.1(Beta) &KDE
    FYIs from the days of yore

  4. #4
    Join Date
    Jun 2008
    Location
    UTC+10
    Posts
    9,686
    Blog Entries
    4

    Default Re: Apache 301 Permanent redirect won't stop cancelled

    Yeah, such URLs should be tested using wget --spider --proxy=0 -S to show the server response.

  5. #5
    Join Date
    Jun 2008
    Location
    Netherlands
    Posts
    25,261

    Default Re: Apache 301 Permanent redirect won't stop cancelled

    You are welcome. I wasn't sure the restart would help, but you did not mention if you did, etc. In any case I often just give a clue to bring people away from their strain of thought (ppl often run circles iin their mind jumping over the real cause of a problem). It often helps even without me understanding what the problem was and what the solution.
    Henk van Velden

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •