Answers.Body: <p>The client must have added a new rule which was causing the problem.</p>
  
  <p>changed from </p>
  
  <pre><code>RewriteRule (.+) index.php?p=$1 [L]
  </code></pre>
  
  <p>to </p>
  
  <pre><code>RewriteRule (.+) index.php [L]
  </code></pre>
  
  <p>Not exactly sure why they added that but...</p>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2016-10-12T18:54:25.937Z
Answers.Text: I encountered a similar problem.  I've been using the letter "p" as part of a search string so `www.website.com/test?p=querystring`. It worked for more 6 months and now all of a sudden it doesn't work.  Thanks to this post I looked in my .htaccess file and see this rewrite rule: `RewriteRule (.+) index.php?p=$1 [QSA,L]` which was there by default when I installed Craft.  I changed my query string parameter to "q" and now it works again.  Not sure if something changed when I updated to the latest Craft version or if it's something else.
Answers.UserDisplayName: Lori
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2015-07-01T20:30:12.643Z
Answers.LastActivityDate: 2015-07-02T00:33:54.520Z
Answers.LastEditDate: 2015-07-02T00:33:54.520Z
Answers.UserDisplayName: Bowenac
Body: <p>Not sure what is happening but </p>
  
  <pre><code>{% set searchQuery = craft.request.getParam('q') %}
  </code></pre>
  
  <p>Does not seem to be working at all on a different server than staging. Anyone seen this before? Any ideas what could be preventing getParam from working? Here is what the end of my url looks like with the param: <code>results?q=test</code></p>
  
  <p>I then later try to display the search parameter like.</p>
  
  <pre><code>&lt;h1 class="text-uppercase"&gt;Search Results {{searchQuery}}&lt;/h1&gt;
  </code></pre>
  
  <p>But it only displays Search Results leaving the parameter empty... and my search results seem to be returning everything since it is basically doing a wildcard search since I'm using this below to query the matching results...</p>
  
  <pre><code>{% paginate craft.entries.search(searchQuery).order('score').limit(10) as entries %}
  </code></pre>
  
  <p>Everything works as expected on staging server.</p>
  
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2015-06-30T17:19:23.403Z
Comments.Text: Are you sure `getParam` is the issue?  What happens if you `{{ searchQuery }}` immediately after `{% set searchQuery = craft.request.getParam('q') %}`?  Does it output `test`?
Comments.UserDisplayName: Brad Bell
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2015-06-30T17:32:26.887Z
Comments.Text: Outputs nothing, just like how its not outputting in the h1 I mentioned.
Comments.UserDisplayName: Bowenac
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2015-06-30T17:44:59.407Z
Comments.Text: Maybe some `.htaccess` rewrite rule that's dropping query strings?
Comments.UserDisplayName: Brad Bell
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2015-07-01T03:26:23.497Z
Comments.Text: It sure was, client added some odd rule.
Comments.UserDisplayName: Bowenac
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2015-07-01T04:51:51.817Z
Comments.Text: Can you add that as an official answer?
Comments.UserDisplayName: Brad Bell
Tags: <plugin-development><templating><params>
Title: getParam not working on live server?
ThreadText: # getParam not working on live server?
  
  (Asked by: username_0 on 2015-06-30)
  
  Not sure what is happening but
  
  ```
  {% set searchQuery = craft.request.getParam('q') %}
  
  ```
  
  Does not seem to be working at all on a different server than staging. Anyone seen this before? Any ideas what could be preventing getParam from working? Here is what the end of my url looks like with the param: `results?q=test`
  
  I then later try to display the search parameter like.
  
  ```
  <h1 class="text-uppercase">Search Results {{searchQuery}}</h1>
  
  ```
  
  But it only displays Search Results leaving the parameter empty... and my search results seem to be returning everything since it is basically doing a wildcard search since I'm using this below to query the matching results...
  
  ```
  {% paginate craft.entries.search(searchQuery).order('score').limit(10) as entries %}
  
  ```
  
  Everything works as expected on staging server.
  
  **Tags:** plugin-development, templating, params
  
  > **Comments:**
  > **username_1**: Are you sure `getParam` is the issue?  What happens if you `{{ searchQuery }}` immediately after `{% set searchQuery = craft.request.getParam('q') %}`?  Does it output `test`?  
  > **username_0**: Outputs nothing, just like how its not outputting in the h1 I mentioned.  
  > **username_1**: Maybe some `.htaccess` rewrite rule that's dropping query strings?  
  > **username_0**: It sure was, client added some odd rule.  
  > **username_1**: Can you add that as an official answer?  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_0 on 2015-07-01. Score: 3
  
  The client must have added a new rule which was causing the problem.
  
  changed from
  
  ```
  RewriteRule (.+) index.php?p=$1 [L]
  
  ```
  
  to
  
  ```
  RewriteRule (.+) index.php [L]
  
  ```
  
  Not exactly sure why they added that but...
  
  > **Comments:**
  > **username_2**: I encountered a similar problem.  I've been using the letter "p" as part of a search string so `www.website.com/test?p=querystring`. It worked for more 6 months and now all of a sudden it doesn't work.  Thanks to this post I looked in my .htaccess file and see this rewrite rule: `RewriteRule (.+) index.php?p=$1 [QSA,L]` which was there by default when I installed Craft.  I changed my query string parameter to "q" and now it works again.  Not sure if something changed when I updated to the latest Craft version or if it's something else.  
  
  ---
  
  