Passing URL as parameter using mod_rewrite
- by Dusan
I would like to rewrite dynamic URL
/index.php?pid=login&redirect=/previous-page.html
to something like this
/login.html-r-previous-page.html
I tried this
RewriteRule ^login.html-r-(.*)$ /index.php?pid=login&redirect=$1 [L]
But no succes. I was also trying to change the regex to .+ or some other forms, but it seems useless. Maybe I am making mistake somewhere else.
I am new to regular expressions and also mod_rewrite.
Thank you for help