Url rewrite without passing filename

I have this rule:

RewriteRule ^.*/pr/?([^/]*)/?([^/]*)/?$ /product.php?products_id=$1&page=$2

Is it possible to capture target file (file where link leads to) without including it into string passed to rewrite?
String to rewrite I’m passing looks something like this:

[dabljux3].site.com/cables-accessories/speaker-cables/audioquest/type-6-offcut/product/2393/1

Please note: no filename passed.

I tried (among others):

RewriteRule ^.*/product/?([^/]*)/?([^/]*)/?$ /%{REQUEST_FILENAME}?products_id=$1&page=$2

cur it does not seem to work.

Anyone can help?

jeff,

Rather than passing the original URI, use {THE_REQUEST}. Just have a play with it as it includes the method (POST/GET) as well as other information (besides the requested URI).

[QUOTE=jeffz2008;4505397]I have this rule:

RewriteRule ^.*/pr/[COLOR="Red"]?[/COLOR]([^/]*)/?([^/]*)/?$ /product.php?products_id=$1&page=$2

Is that ? supposed to be the ? metacharacter (zero or one of the preceding character) OR the separation character to denote the query string (which can only be accessed by a RewriteCond looking at the {QUERY_STRING})? Okay, from your example, you’re okay as it didn’t have a query string.

Regards,

DK