Jump to content

htaccess mod rewrite works for some not others


zimmo

Recommended Posts

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.
 
 
 
 

 

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.