Hi there,
I want to be able to rewrite urls turning gets into search engine friendly urls. At the same time i have a contact form and i want to be able to use gets to produce error messages. For example:
In .htacces:
RewriteEngine On
Options +FollowSymlinks
RewriteRule ^([A-Za-z0-9-]+)/$ /?page_url=$1 [L]
So this URL works fine:
http://www.logfc0809wip.thewebmill.co.uk/contact/
echo $_GET['page_url']; /*Output is 'contact'*/
And so do these:
http://www.logfc0809wip.thewebmill.co.uk/contact/?msg=sent
http://www.logfc0809wip.thewebmill.co.uk/contact/?msg=senderror
echo $_GET['page_url']; /*Output is 'contact'*/
echo $_GET['msg']; /*Output is nothing*/
So $_GET['msg'] produces nothing. Is there a way to do this? Any suggestions?
Many thanks
dynamic rewriting using both get and post
Moderator: General Moderators
-
bertsmilsky
- Forum Newbie
- Posts: 13
- Joined: Fri Jul 18, 2008 10:23 am
-
filippo.toso
- Forum Commoner
- Posts: 30
- Joined: Thu Aug 07, 2008 7:18 am
- Location: Italy
- Contact:
Re: dynamic rewriting using both get and post
Add the QSA flag to your RewriteRule