Results 1 to 7 of 7
  1. #1
    Grandma broke her coccyx! Uncle Rico's Avatar
    Join Date
    May 8th, 2007
    Location
    North Carolina
    Posts
    2,238
    broken site from htaccess
    I was adding a new entry to my htaccess file and all the mod rewrites broke. I removed the entry, but everything still seess to be broken. I rewrite /home.php to /home but it's now broken. I didn't change this entry in the htaccess file.

    I get the error.

    The requested URL /home was not found on this server.

    Code:
    I rewriting site.com/home to site.com/home.php
    #
    RewriteRule  ^home$ home.php [L]
    #
    Been working for a while now this way so I don't understand what happened.

  2. #2
    Member
    Join Date
    May 20th, 2007
    Location
    USA
    Posts
    45
    Try
    RewriteRule ^home$ /home.php [L]
    or
    RewriteRule ^home/$ /home.php [L]
    or
    RedirectPermanent /home/ /home.php

  3. #3
    Grandma broke her coccyx! Uncle Rico's Avatar
    Join Date
    May 8th, 2007
    Location
    North Carolina
    Posts
    2,238
    Seems there was a problem with the formatting of the htaccess file. When I pulled the copy from the server, it was one single line with no line breaks. Not sure how that happened.

  4. #4
    ABW Ambassador VampireSkunk's Avatar
    Join Date
    May 24th, 2007
    Location
    South East Asia
    Posts
    1,045
    Sometimes when you ftp plain text files in 'auto' mode, the carriage returns get stripped out. Never figured out why.

  5. #5
    ABW Ambassador beachcom's Avatar
    Join Date
    May 11th, 2006
    Location
    Myrtle Beach SC
    Posts
    723
    Had that happen to me a few weeks ago. Scared the crap out of me.....had the same rewrite error.
    Sometimes when you ftp plain text files in 'auto' mode, the carriage returns get stripped out. Never figured out why.
    I think that's what happened to me. Luckily I saved my old htaccess file and reloaded it and all was fine.

  6. #6
    ABW Ambassador ladidah's Avatar
    Join Date
    October 15th, 2007
    Location
    MA
    Posts
    1,888
    I also had an .htaccess scare last night. Maybe it's a jinx.

    I left a </limit> all the way at the bottom of the file and forgot to take it out and gave me a 500 error, whatever that means.

    beachcom, that reminds me to keep a copy. I looked at my old copy on my HD and it was nowhere near the one that I had on the server. Time to back up.

  7. #7
    Full Member c4's Avatar
    Join Date
    January 18th, 2005
    Posts
    488
    Just make sure you transfer .htaccess always in ASCII (plain text) mode ;-)
    [URL=http://www.hesk.com]Help desk software[/URL]

  8. Newsletter Signup

+ Reply to Thread

Similar Threads

  1. htaccess help
    By John Kruger in forum Programming / Datafeeds / Tools
    Replies: 13
    Last Post: February 8th, 2008, 10:20 AM

Posting Permissions

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