I am submitting a normal <form method="get"> element to the current url… It’s part of a search page. The resulting url is below.
http://domain.com/module/controller/action/get1/value1/?get2=get2&value3=value3
The problem is I am using <?= $this->url(array('page' => x)); ?> and similar to navigate around but I want to retain the $_GET params… Whenever I use it, it retains the / slashed $_GET params and looses the ?&= value pairs…
I want to use Mod_Rewrite to change the value pairs to slashes…
My current rule is..
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} -s [OR]
RewriteCond %{REQUEST_FILENAME} -l [OR]
RewriteCond %{REQUEST_FILENAME} -d
RewriteRule ^.*$ - [NC,L]
RewriteRule ^.*$ zend.php [NC,L]
I’m not confident with Mod_Rewrite and I don’t want to conflict with the existing rules.
I also like a trailing slash as well… so that would be a bonus…
Please help!! Many thanks…
PS…
Re “Zend_Router… Zend_Form..” in the title. I am using Zend_Form to construct the form and I realise that I could use javascript on the onSubmit function to write the URL… similarly I could use the Zend_Router to rewrite the url… I think Mod_rewrite is best though…
I could not find a nice way to do this… so I resolved to write some minimised PHP code at the top of my
zend.php.If anyone can improve on this please comment below.