0

Possible Duplicate:
Everything You Ever Wanted to Know about Mod_Rewrite Rules but Were Afraid to Ask?

what's the use of back references in Rewriterule in mod_rewrite?

0

1 Answer 1

0

See this for excruciating details:

Redirect, Change URLs or Redirect HTTP to HTTPS in Apache - Everything You Ever Wanted to Know About Mod_Rewrite Rules but Were Afraid to Ask

Backreferences are used to address specific match-groups in RewriteRule segments.

RewriteRule ^/blog/(2008|2009)/(.*)$   /newblog/$1/$2

(2008|2009) is a reference, and $1 is the backreference. Same for (.*) and $2. As you can see, they're used for URL rewriting. See the "RewriteRule matching syntax" section of the answer I linked to.

Not the answer you're looking for? Browse other questions tagged .