Good Afternoon:

I am looking to use Apache's mod_rewrite module to rearrange some URLs, but my knoweldge of regular expressions is SORELY lacking.

I would like to take a url such as:

and translate it to:

and, just as likely:


Would someone please assist me with this? I would greatly appreciate it!

First, configure your servers and virtual servers with mod_rewrite by adding this to apache (I'm assuming you're using apache):

RewriteEngine on
RewriteLog /path/to/logs/server.rewrite.txt
RewriteLogLevel 1

Next, find out which scheme you would like to use for rewrite depending on your comfort zone with apache directives...

That should get you where you need to go.

I had gotten that far, but am specifically confused with how to write the regular expresssions to do the URL replacement.