Regular expression help


I need help in Regular expression.


I tried:

RewriteRule ^MyPaper/Jobs-([0-9][0-9]\\-[0-9][0-9]\\-[0-9][0-9][0-9][0-9]) /test.php?cat_id=1&date=$2&paper_id=1

But it did not work… help please?


RewriteRule ^MyPaper/Jobs-[COLOR="Red"]([0-9][0-9]\\-[0-9][0-9]\\-[0-9][0-9][0-9][0-9])[/COLOR]

The part in red is $1, but you have $2 in the rule. Make that $1 and it should work :slight_smile:

Also, if test.php is in the same directory, drop the / in front of it.

I tried it like like this but it did not work:

RewriteRule ^MyPaper/Jobs-([0-9][0-9]\\-[0-9][0-9]\\-[0-9][0-9][0-9][0-9]) /test.php?cat_id=1&date=$1&paper_id=1

Says page not found…

Does test.php exist?
And what did it say when you had $2 instead of of $1 ? Also “page not found” ?