Jump to content

Rewrite rule for two pages in same thaccess


sz_tech

Recommended Posts

Hello, I have this rule in htaccess file that handles URL for item,

Options All
RewriteEngine On
RewriteBase /www/
RewriteCond %{THE_REQUEST} \ /www/item\.php\?id=([0-9]+)&([^&\ ]+)
RewriteRule ^ %1/%2? [L,R=301]
RewriteRule ^([0-9]+)/(.*)$ item.php?id=$1&$2 [L,QSA,NE] 

in same htaccess I need to handle catlist also
with this rule:

RewriteCond %{THE_REQUEST} \ /www/category\.php\?id=([0-9]+)&([^&\ ]+)
RewriteRule ^ %1/%2? [L,R=301]
RewriteRule ^([0-9]+)/(.*)$ category.php?id=$1&$2 [L,QSA,NE] 

When I put them together only first one works
Any solutions or ideas
Thank You

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.