views:

13

answers:

1

Hi, Hope you are fine.

I have a problem, if you can help me.

#My rules (in this order):#

(WORKING:)

RewriteRule ^artists\/(.*[^discographies])\,([0-9]*)\/$ /artists/artist.php?id=$2 [L]

URL: /artists/B/barrington-levy,869/


(WORKING:)

RewriteRule ^artists\/(.*[^discographies])\,([0-9]*)\/discography\/$ /artists/discography.php?id=$2 [L,QSA]

URL: /artists/B/barrington-levy,869/discography/


(WORKING:)

RewriteRule ^artists\/(.*[^discographies])\/$ /artists/alpha.php?id=$1 [L]

URL: /artists/B/


Now i need to make some new rules, and i suck !


The first : /artists/discographies/1979/barrington-levy-shaolin-temple,85/

(NOT WORKING:)

RewriteRule ^artists\/discographies\/([0-9]*)\/(.*)\,[(0-9)*]\/$ /artists/disc.php?id=$4 [L]

The second: /artists/discographies/2009-10/various-artists,jah-shaka-presents-the-positive-message,2563/

(NOT WORKING:)

RewriteRule ^artists\/discographies\/([0-9]*)\-([0-9]*)\/(.*)\,[(0-9)*]\/$ /artists/disc.php?id=$4 [L]
+1  A: 

Instead of [(0-9)*] try ([0-9]*)

So for the entire rule replace:

RewriteRule ^artists\/discographies\/([0-9]*)\/(.*)\,[(0-9)*]\/$ /artists/disc.php?id=$4 [L]
RewriteRule ^artists\/discographies\/([0-9]*)\-([0-9]*)\/(.*)\,[(0-9)*]\/$ /artists/disc.php?id=$4 [L]

With:

RewriteRule ^artists\/discographies\/([0-9]*)\/(.*)\,([0-9]*)\/$ /artists/disc.php?id=$3 [L]
RewriteRule ^artists\/discographies\/([0-9]*)\-([0-9]*)\/(.*)\,([0-9]*)\/$ /artists/disc.php?id=$3 [L]
WoLpH
Also, unless I'm missing something, both the first and the third rule should have $3, not $4.
Litso
Nice.Thanks you!
soulfaya
if the answer works, please do accept it :)
Litso