Richard
Richard

Reputation: 4546

get query from Zend Request object

Can anyone tell me why the result from this

$month = $this->getRequest()->getQuery('month');

is an empty string

The call is made from my blogcontroller class which extends Zend_Controller_Action

the URL: htp://www.domain.nl/blogmanager/?month=2005-01

could it be my htaccess?

Options +FollowSymlinks
RewriteEngine On
Options All -Indexes
IndexIgnore *
DirectoryIndex index.php 
RewriteCond %{SCRIPT_FILENAME} !-d 
RewriteCond %{SCRIPT_FILENAME} !-f 
RewriteRule ^(.*)$ index.php?/$1

EDIT: solved it, I had to remove the questionmark from the rewriterule

Upvotes: 1

Views: 495

Answers (2)

Songo
Songo

Reputation: 5736

I think this should be

RewriteRule ^(.*)$ index.php/$1

Upvotes: 2

Sudhir Bastakoti
Sudhir Bastakoti

Reputation: 100175

Try:


$params = $this->getRequest()->getParams();

Or


$month = $this->getRequest()->getParam('month');

Upvotes: 1

Related Questions