Reputation: 779
Hi basically I have come up against one of the most frustrating problems I've been brought in to help fix a site (I didn't write it whcih adds to the complexity). In the .htaccess file, the old company used rewrite rules to make URLs look cleaner. Makes sense, looks something like this:
RewriteRule ^products/([A-Za-z0-9-]+)/([A-Za-z0-9-]+)$ productDetail.php?cid=$1&pid=$2
RewriteRule ^products/([A-Za-z0-9-]+)$ category.php?cid=$1
RewriteRule ^page/([A-Za-z0-9-]+)$ page.php?ptitle=$1
RewriteRule ^basket$ basket.php
RewriteRule ^basket/$ basket.php
#RewriteRule ^checkout/$ checkout.php
#RewriteRule ^checkout$ checkout.php
#RewriteRule ^checkout/confirm/$ confirm.php
#RewriteRule ^checkout/confirm$ confirm.php
Works fine, and if i change anything in the first few rules the changes are reflected on the site. Not so for the last four. These rules WILL NOT CHANGE. No matter what I do, if I make them asdljkhfaksd.php, if I comment them out completely (as I have done currently), or if I delete the whole .htaccess file (this does break all the other rules, so the server is definitely using the file). No directories above it have any conflicting rules in their .htaccess files, and I can just think of no reason why going to xxx.com/checkout would bring up the page checkout.php if there is NO RULE for it. Any suggestions for where else this could be being set? Or have I just gone mad?
Upvotes: 0
Views: 243
Reputation: 96383
and I can just think of no reason why going to xxx.com/checkout would bring up the page checkout.php if there is NO RULE for it. Any suggestions for where else this could be being set? Or have I just gone mad?
Can’t answer that last question for you ;-) – but for the one before, that’s usually the “fault” of
being set.
Upvotes: 1