how to understand the %2 %1 $2 $1

New to mod_rewrite? This is a good place to start.

how to understand the %2 %1 $2 $1

Postby kingsz1 » Sun Mar 05, 2006 9:00 pm

I am new in mod_rewrite. I got some code from internet, like this:

RewriteEngine on
RewriteBase /
rewriteCond %{HTTP_HOST} ^(www\.)?([^.]+)\.example\.com [NC]
rewriteRule ^(.*)$ %2/$1 [L]

At above code, what is the %2 and $1 means?

I also found some code using %3 and $2, etc. what is means?

Thank you in advanced.
kingsz1
 
Posts: 1
Joined: Sun Mar 05, 2006 8:42 pm

Return to Beginner's Corner

Who is online

Users browsing this forum: No registered users and 31 guests

cron