Rewrite and POST problem

Discuss practical ways rearrange URLs using mod_rewrite.

Rewrite and POST problem

Postby dujardin » Sat May 16, 2009 1:42 pm

Hi
I've got this:
RewriteRule ^photo-([0-9]+)-([a-zA-Z0-9-]+)\.html showphoto.php?photo=$1 [L]

and
RewriteRule ^gallery-([0-9]+)-([0-9]+)-([a-zA-Z0-9-]+)\.html$ showgallery.php?cat=$1&page=$2&name=$3

From the page gallery-500-1-mygalleryname.html:
i've got this url:

http://mysite.com/photo-10-myphotoname.html

this working good

but in the page with this url there's a form with post
like that
<form method="post" action="http://www.mysite.com/showgallery.php">......
</form>

and if i'm using this form my url is now

http://mysite.com/photo-10-myphotoname. ... =7&way=asc


i don't need &sortby=f&sorttime=7&way=asc cause the script is using cookies.

How can i remove "&sortby=f&sorttime=7&way=asc" after my url ?

thx.
dujardin
 
Posts: 1
Joined: Sat May 16, 2009 1:33 pm

Postby richardk » Sun May 17, 2009 9:04 am

Why is it added? Is there a redirect in the PHP that is adding it?
richardk
 
Posts: 8800
Joined: Wed Dec 21, 2005 7:50 am


Return to Friendly URLs with Mod_Rewrite

Who is online

Users browsing this forum: No registered users and 22 guests

cron