dynamic rewriting using both get and post
Posted: Sat Aug 09, 2008 12:17 pm
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
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