PHP/ Apache: URL rewrite
Posted: Tue Dec 08, 2009 7:21 pm
Hi,
How can I rewrite the URL from this,
mysite.com/index.php?pg=news¤t_page=1
to,
mysite.com/news?page=1
I have tried with this, but it doesnt work - something I have missed or it is written wrong completely?
RewriteEngine on
Thanks if you know how to correct it...
Cheers,
Lau
How can I rewrite the URL from this,
mysite.com/index.php?pg=news¤t_page=1
to,
mysite.com/news?page=1
I have tried with this, but it doesnt work - something I have missed or it is written wrong completely?
RewriteEngine on
Code: Select all
RewriteRule
^news?page=([a-zA-Z0-9\-]+)/?$ index.php?pg=news¤t_page=$1 [QSA]Cheers,
Lau