Help! Can't enter more than 23 "301" redirects in HTACCESS

Discussion in 'Apache' started by wmuma, Nov 25, 2005.

  1. #1
    Please help!
    I recently reorganised / restructured a client's website (it was a real mess) and uploaded the changes. 158 pages have changed their URL.
    I of course decided to use 301-redirects in the .htaccess file to handle this, and preserve the client's SEO. Much to my surprise, when I enter more than 23 of these in the .htaccess file the whole site goes down with an error 500!!
    I have tried redirect 301, RedirectMatch permanent (even tried entering via CPanel), etc.
    Different syntax has no effect.
    I launched a support ticket with my webhost but they're stumped, and have launched their own support ticket with CPanel.
    It's been several days now and I am getting very concerned about my client's SEO.
    Any ideas please?????
     
    wmuma, Nov 25, 2005 IP
  2. frankm

    frankm Active Member

    Messages:
    915
    Likes Received:
    63
    Best Answers:
    0
    Trophy Points:
    83
    #2
    I don't think 23 is a limit any sysadmin would buid in. remember they are bin wizzards: 32 or 16 would be more logical to them.

    So I think your last entry is just wrong, which also causes a 500 error.

    can you post that line here? sure someone can help you with that!
     
    frankm, Nov 25, 2005 IP
  3. wmuma

    wmuma Peon

    Messages:
    4
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #3
    Here's the HTACCESS file that DOES WORK.
    This is the syntax generated by CPanel via the "Redirects" button.
    If I add just one more redirect, of any syntax, I get the dreaded 500 error.
    It doesn't matter what syntax I use for all the lines. I have tried several types, all with the same result.
    I get the 500 error even if I generate the next line using CPanel, which presumably would generate the correct syntax.
    Also doesn't matter if I have the "RewriteEngine on" at beginning or not.
    ====.HTACCESSS file follows ======
    RedirectMatch permanent ^/index.htm$ http://systemhorse.com/index.html
    RedirectMatch permanent ^/pages/barnhardware.htm$ http://systemhorse.com/pages/barnhardware/index.html
    RedirectMatch permanent ^/pages/clientconnections/clientconnections.htm$ http://systemhorse.com/pages/clientconnections/index.html
    RedirectMatch permanent ^/company/company.htm$ http://systemhorse.com/pages/company/index.html
    RedirectMatch permanent ^/index.htm$ http://systemhorse.com/index.html
    RedirectMatch permanent ^/pages/barnhardware.htm$ http://systemhorse.com/pages/barnhardware/index.html
    RedirectMatch permanent ^/pages/calendar_events.htm$ http://systemhorse.com/pages/calendarofevents/index.html
    RedirectMatch permanent ^/pages/catalogue.htm$ http://systemhorse.com/pages/catalogue/index.html
    RedirectMatch permanent ^/pages/catalogue_download.htm$ http://systemhorse.com/pages/catalogue/index.html
    RedirectMatch permanent ^/pages/clientconnections.htm$ http://systemhorse.com/pages/clientconnections
    RedirectMatch permanent ^/pages/company.htm$ http://systemhorse.com/pages/company/index.html
    RedirectMatch permanent ^/pages/contact.htm$ http://systemhorse.com/pages/contact/contact.htm
    RedirectMatch permanent ^/pages/contact_cdn.htm$ http://systemhorse.com/pages/contact/contact.htm
    RedirectMatch permanent ^/pages/contact_cdn_win.htm$ http://systemhorse.com/pages/contact/contact.htm
    RedirectMatch permanent ^/pages/directions.htm$ http://systemhorse.com/pages/directions/index.html
    RedirectMatch permanent ^/pages/download.htm$ http://systemhorse.com/pages/download/index.html
    RedirectMatch permanent ^/pages/download_product_info.htm$ http://systemhorse.com/pages/download/index.html
    RedirectMatch permanent ^/pages/exerciser.htm$ http://systemhorse.com/pages/exerciser/index.html
    RedirectMatch permanent ^/pages/faq.htm$ http://systemhorse.com/pages/faq/index.html
    RedirectMatch permanent ^/pages/fence1inch.htm$ http://systemhorse.com/pages/fence1inch/index.html
    RedirectMatch permanent ^/pages/fence4_25inch.htm$ http://systemhorse.com/pages/fence425inch/index.html
    RedirectMatch permanent ^/pages/fence4inch.htm$ http://systemhorse.com/pages/fence4inch/index.html
    RedirectMatch permanent ^/pages/fence5inch.htm$ http://systemhorse.com/pages/fence5inch/index.html
    RedirectMatch permanent ^/pages/fenceaccessories.htm$ http://systemhorse.com/pages/fenceaccessories/index.html
    RedirectMatch permanent ^/pages/fencebraid.htm$ http://systemhorse.com/pages/fencebraid/index.html
     
    wmuma, Nov 25, 2005 IP
  4. wmuma

    wmuma Peon

    Messages:
    4
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #4
    But just now, I have continued to fiddle with this, as I have all evening.
    And NOW, adding more than 23 works! What's going on here???
    I assure you I am not doing anything different!! Not smoking anything either!
    I am adding bunches of about 10 at a time, expecting it to break any moment.
    Perhaps the webhost got a reply and have fixed whatever the problem was?
    I'm up to 62 now and no problem.
    Thanks for the replies and starting to help me!!
    I will post if I have success or not when I get them all in.

    Although I am very puzzled as to why it now works, i am very relieved as well!
     
    wmuma, Nov 25, 2005 IP
  5. wmuma

    wmuma Peon

    Messages:
    4
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #5
    I have now placed all 159 301 redirects into the file and it's now working ok.
    Perhaps there was a subtle syntax error that I overlooked?
    I have abolsutely no idea. I'm simply glad it's working now.
     
    wmuma, Nov 25, 2005 IP
  6. Old Welsh Guy

    Old Welsh Guy Notable Member

    Messages:
    2,699
    Likes Received:
    291
    Best Answers:
    0
    Trophy Points:
    205
    #6
    best leave it alone now then :D
     
    Old Welsh Guy, Nov 26, 2005 IP
  7. Imran

    Imran Notable Member

    Messages:
    2,340
    Likes Received:
    190
    Best Answers:
    0
    Trophy Points:
    230
    #7
    good, nice to know!
     
    Imran, Nov 27, 2005 IP