Forum Moderators: phranque

Message Too Old, No Replies

301 redirect throws a 404

Bst

         

jackson

4:43 pm on Jun 15, 2003 (gmt 0)

10+ Year Member



Hi. I've been "lurking" here awhile. Have managed to get most of my .htaccess's sorted out thanks to all here.

However, have this issue. I'm trying to do some redirects from some old pages to new. The syntax of the respective pages is more or less as follows:

../text/oldpage.htm to ../pages6G/newpage.html

The base URL is the same in each case.

I have tried several permutations as suggested here by jdMorgan and DaveAtIFG. The best I have got so far is a 404 using my own custom error page. Not quite what was intended. Included "Options ..." but that seems to throw up a 500 error and sends the server into a loop. Also, there may be an issue at the hosting end. The webmaster/tech support there seems a little uncertain about mod_rewrites, etc. Yes, they're using Apache, etc.

Any suggestions would be appreciated. TIA

jdMorgan

5:47 pm on Jun 15, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



jackson,

Welcome to WebmasterWorld [webmasterworld.com]!

Suggestions:

  • Try a very simple rewrite, such as RewriteRule ^indox\.html$ /index.html [R=301,L], where "index.html" is an existing page, then request "indox.html" and see what happens.
  • Post a few of your rules after changing the domain name to "example.com" to comply with WebmasterWorld TOS.
  • Post the relevant lines from your raw error log showing the 404 error.

    There are so many variations in server setup that it's impossible to tell from your posted descritpion what might be wrong, without seeing a bit more data.

    Jim

  • jackson

    2:40 pm on Jun 16, 2003 (gmt 0)

    10+ Year Member



    Jim, thanks for your reply.

    As mentioned I've tried many a permutation before turning to these pages. And, its that KISS principle that seems to win the day again and again.

    Am doing this and it appears to be working:

    RewriteEngine On
    RewriteRule ^text/archpg\.htm$ /pages6G/com.html [R=301,L]

    Wasn't sure whether to include the items preceeding the html page or not. Seems to work fine with the above order - so let's see how it goes with the rest.

    Thanks again.