Forum Moderators: phranque

Message Too Old, No Replies

Using rewriterule with form GET method

Is it possible?

         

twist

11:13 pm on Jan 1, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



I have two drop down menu boxes and a button. The user selects from the drop down menus and pushes the button. Instead of using POST I have decided to use the GET method to carry the variables to the next page. Something like this,

[example.com...]

I have a rewrite rule like such,

RewriteRule ^page/([0-9]+)/([0-9]+)?$ /page.php?var1=$1&var2=$2 [L]

Is there anyway using the GET method to make the url on the next page appear like this,

[example.com...]

I haven't tried using javascript but I don't want to anyway.

Any ideas?

jdMorgan

12:43 am on Jan 9, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



You must use a 301 external redirect from the dynamic URL to the static URL in order to affect the browser's address bar. However, since you already have a rule that rewites the static URL to the dynamic one, you'll have to check the variable %{THE_REQUEST} and do the redirect only if the dynamic page is requested directly. Otherwise, you'll get an infinite loop.

Jim