mod_rewrite newbie needs help with a RewriteRule

Discussion in 'Apache' started by saneinsight, Sep 23, 2006.

  1. #1
    Hi,

    I have had some success with mod_rewrite but i have a problem i can't understand.

    I want to rewrite the following url :
    alpha.php/alpha/a?osCsid=1d207d6d6b214b7daf5c8ac80a14bbd1

    to look like :
    alpha.php?alpha=a&osCsid=e84a6d2f4145bac3130c4484942f3ca0

    if I ignore the osCsid parameter i can get it to rewrite using:
    RewriteRule ^alpha\.php/alpha/([a-z]{1})?$ alpha\.php?alpha=$1

    to add osCsid param i have the rule below which leaves the url unchanged :
    RewriteRule ^alpha\.php/alpha/([a-z]{1})?osCsid=([^/.]+)$ alpha\.php?alpha=$1&osCsid=$2

    can anyone help me attach the osCsid parameter on to the end of the url?

    many thanks
    Sane
     
    saneinsight, Sep 23, 2006 IP