Someone I'm working with committed a RewriteRule such as the following to SVN:
RewriteRule ^admin/ebay.*$ /yii.php/$1 [L]
I warned him that it may not work because there is no subgroup in the match that would correspond to the $1 backreference. It does work, and I'm perplexed. I'm pretty sure what he intended was either of the following:
RewriteRule ^admin/ebay.*$ /yii.php/$0 [L] # $0 is whole match
RewriteRule ^admin/ebay(.*)$ /yii.php/$1 [L] # $1 subgroup
Does Apache make an assumption about backreferences that I never knew about? Why does his RewriteRule (the top one) work?