TECH htaccess stopped working

intrktevo

New Member
Oct 18, 2004
5,778
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
 
TS
TS
intrktevo

intrktevo

New Member
Oct 18, 2004
5,778
UCF
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

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..
 
TS
TS
intrktevo

intrktevo

New Member
Oct 18, 2004
5,778
UCF
i emailed my host and they said they hadn't changed anything..

is there any other reason that rewrite wouldn't work?
 
TS
TS
intrktevo

intrktevo

New Member
Oct 18, 2004
5,778
UCF
figured out the problem...i had created a new file called restaurant.php for some reason it was messing with the /restaurant/ rewrite..
 

Users who are viewing this thread

About Us

  • Please do not post anything that violates any Local, State, Federal or International Laws. Your privacy is protected. You have the right to be forgotten. Site funded by advertising, link monetization and member support.
OT v15.8.1 Copyright © 2000-2022 Offtopic.com
Served by fu.offtopic.com

Online statistics

Members online
432
Guests online
42
Total visitors
474

Forum statistics

Threads
369,470
Messages
16,886,162
Members
86,873
Latest member
vitalesan