WEB htaccess stopped working

Discussion in 'OT Technology' started by intrktevo, Oct 10, 2008.

  1. intrktevo

    intrktevo New Member

    Joined:
    Oct 18, 2004
    Messages:
    5,781
    Likes Received:
    0
    Location:
    UCF
    My website's htaccess file for some reason isn't picking up a rewrite rule that worked before.

    Code:
    ErrorDocument 404 /errorpages/404.php
    
    RewriteEngine On  
    
    RewriteCond %{HTTP_HOST} !^www\.
    RewriteRule ^(.*)$ http://www.%{HTTP_HOST}/$1 [R=301,L]
    
    RewriteRule ^([A-Za-z]{1})$ /food.php?l=$1 [L]
    RewriteRule ^09$ /food.php?l=09 [L]
    RewriteRule ^category/([^/]+)$ /food.php?c=$1 [L]
    RewriteRule ^restaurant/([^/]+)/([0-9]+)/?$ /food.php?step=rest&id=$2 [L]
    RewriteRule ^sitemap.xml$ /sitemap.php     
    
    The category rewrite works, but the restaurant one does not.

    url example: http://www.site.com/restaurant/El_Corral_Pollos_A_La_Brasa/154/

    What's really weird is I get the standard host 404 error page for the above url, even though I have a custom one set up that works for things like site.com/sdgsd.html
     
  2. themolsen

    themolsen New Member

    Joined:
    Sep 29, 2006
    Messages:
    7,414
    Likes Received:
    0
    Location:
    Jacksonville, FL
    did you alter PHP safe_mode? some hosts have weird modes you have to enable in order to disable safe_mode and it messes up some .htaccess rules
     
  3. intrktevo

    intrktevo New Member

    Joined:
    Oct 18, 2004
    Messages:
    5,781
    Likes Received:
    0
    Location:
    UCF
    haven't touched anything like that..

    I'm hosted with 1&1 and my htacess rules would stop working every now and then, but never for this long..
     
  4. thomor25

    thomor25 I make money online....

    Joined:
    Jun 11, 2000
    Messages:
    11,101
    Likes Received:
    0
    Location:
    Denver Colorado
    they might have upgraded apache or php
     
  5. intrktevo

    intrktevo New Member

    Joined:
    Oct 18, 2004
    Messages:
    5,781
    Likes Received:
    0
    Location:
    UCF
    what would I need to do to make my file compatible?
     
  6. intrktevo

    intrktevo New Member

    Joined:
    Oct 18, 2004
    Messages:
    5,781
    Likes Received:
    0
    Location:
    UCF
    i emailed my host and they said they hadn't changed anything..

    is there any other reason that rewrite wouldn't work?
     
  7. 95vr4

    95vr4 OT Supporter

    Joined:
    Oct 6, 2004
    Messages:
    2,513
    Likes Received:
    0
    Location:
    Weddington, NC
    It'd help if you posted the actual url to the problem so we could see what's actually going on in Firebug.
     
  8. intrktevo

    intrktevo New Member

    Joined:
    Oct 18, 2004
    Messages:
    5,781
    Likes Received:
    0
    Location:
    UCF
  9. intrktevo

    intrktevo New Member

    Joined:
    Oct 18, 2004
    Messages:
    5,781
    Likes Received:
    0
    Location:
    UCF
    figured out the problem...i had created a new file called restaurant.php for some reason it was messing with the /restaurant/ rewrite..
     

Share This Page