<p>This sounds similar to your issue, have a look. People provided a solution there, it apparently might have something to do with your .htaccess file.</p>

<p><a href="https://craftcms.stackexchange.com/questions/10416/getparam-not-working-on-live-server?noredirect=1&amp;lq=1">getParam not working on live server?</a></p>

CC BY-SA 3.0
2017-08-11T17:16:41.473Z
Good idea. I'm using the nginx server though.
Molly Harper
CC BY-SA 3.0
2017-08-11T06:09:46.377Z
2017-08-11T06:09:46.377Z
justussimon91
<p>I have a search that is working locally, but not when I push it to my test environment.</p>

<p>I imported the database from my local environment into test, so the data should exist.</p>

<p>The URL for each is:</p>

<p>test: <a href="https://mytesturl/site/?q=test" rel="nofollow noreferrer">https://mytesturl/site/?q=test</a></p>

<p>local: <a href="http://local/site/?q=test" rel="nofollow noreferrer">http://local/site/?q=test</a></p>

<p>I set the query, which returns null/empty in test, but populates correctly locally:</p>

<p>{% set query = craft.request.getParam('q') %}</p>

<p>I'm drawing a blank what could be wrong. Seems to be a config issue, but I'm not sure where to look.</p>

<p>Any ideas? Thanks!</p>

<query><querystring>
Craft request returns null in test, but works locally
# Craft request returns null in test, but works locally

(Asked by: username_0 on 2017-08-11)

I have a search that is working locally, but not when I push it to my test environment.

I imported the database from my local environment into test, so the data should exist.

The URL for each is:

test: <https://mytesturl/site/?q=test>

local: <http://local/site/?q=test>

I set the query, which returns null/empty in test, but populates correctly locally:

{% set query = craft.request.getParam('q') %}

I'm drawing a blank what could be wrong. Seems to be a config issue, but I'm not sure where to look.

Any ideas? Thanks!

**Tags:** query, querystring


---

## 1 answers

### Answer by username_1 on 2017-08-11. Score: 1

This sounds similar to your issue, have a look. People provided a solution there, it apparently might have something to do with your .htaccess file.

[getParam not working on live server?](https://craftcms.stackexchange.com/questions/10416/getparam-not-working-on-live-server?noredirect=1&lq=1)

> **Comments:**
> **username_0**: Good idea. I'm using the nginx server though.  

---

