zimmo Posted June 4, 2014 Share Posted June 4, 2014 I was trying to refrain from posting, but its driving me mad and I am not sure what to do. Here is the issue. I have some rewrite rules and are making them better. But for now just need to know why this rule is giving me a page not found everytime. Firstly, this rule works fine: Options +FollowSymLinks RewriteEngine on # ## Rewrite rules for the instruments RewriteRule ^onlinestore/classical-guitar-new-arrivals/$ onlinestore/instruments.php?category=NA [QSA,L] So if I enter: domain.com/onlinestore/classical-guitar-new-arrivals/ it returns the page: domain.com/onlinestore/instruments.php?category=NA All works fine. However the next rule is giving me a page not found 404 error but I cannot see why. RewriteRule ^onlinestore/classicalguitars/([0-9]+)/?$ onlinestore/instrument_view.php?id=$1 [NC,L] I enter: domain.com/onlinestore/classicalguitars/472/ It should return the page: domain.com/onlinestore/instrument_view.php?id=472 But I get a page not found each time, completely stuck as to why? Any help appreciated as I want to improve the site. But need to get past this hurdle. Link to comment https://forums.phpfreaks.com/topic/288976-htaccess-mod-rewrite-works-for-some-not-others/ Share on other sites More sharing options...
zimmo Posted June 4, 2014 Author Share Posted June 4, 2014 Sorry people, got it working was a typo. Link to comment https://forums.phpfreaks.com/topic/288976-htaccess-mod-rewrite-works-for-some-not-others/#findComment-1481835 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.