Jump to content

htaccess mod rewrite works for some not others


zimmo
Go to solution Solved by 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.
 
 
 
 

 

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.