tags:

views:

7

answers:

1

Hey everyone. I've found examples of rewriting a URL to a variable, given that you go example,com/r/33 and the variable would be r=33. I'd like for the variable name to be default, and just put example,com/33 and then the php would get r=33

Specifics.... I would like our site http://www.buybattle.com/houston to pass city=houston to the page.

Any help would be greatly appreciated. Thanks Robert

A: 
RewriteRule ^/(.*)$ http://www.buybattle.com?city=$1

Not tested.

You should learn regexp before using url rewriting.

MatTheCat