Rewriting a url

Need help installing PHP, configuring a script, or configuring a server? Then come on in and post your questions! We'll try to help the best we can!

Moderator: General Moderators

Post Reply
mzfp2
Forum Contributor
Posts: 137
Joined: Mon Nov 11, 2002 9:44 am
Location: UK
Contact:

Rewriting a url

Post by mzfp2 »

Hope someone can help me with this,

I need to rewrite a friendly url :

http://mydomain.com/p/variable_1/variable2/

to

http://mydomain.com/register.php?ID=var ... variable_2

where variable is a number between 0 .. 9999,
variable_2 is a alphanumeric string

Thanks in advance
User avatar
feyd
Neighborhood Spidermoddy
Posts: 31559
Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA

Post by feyd »

User avatar
John Cartwright
Site Admin
Posts: 11470
Joined: Tue Dec 23, 2003 2:10 am
Location: Toronto
Contact:

Post by John Cartwright »

Code: Select all

RewriteEngine On
RewriteBase /

Rewriterule ^p/([0-9]+)/([a-Z0-9]+)$	/register.php?ID=$1&username=$2
untested

feyd: grr... :wink:
Post Reply