Passing URL as parameter using mod_rewrite
Posted
by Dusan
on Stack Overflow
See other posts from Stack Overflow
or by Dusan
Published on 2010-06-10T09:09:50Z
Indexed on
2010/06/10
9:12 UTC
Read the original article
Hit count: 249
mod-rewrite
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
© Stack Overflow or respective owner