Answers.Body: <p>There is an explanation of why this can occur on the Craft help section here: <a href="http://buildwithcraft.com/help/why-index.php" rel="nofollow">http://buildwithcraft.com/help/why-index.php</a></p>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2014-09-18T22:21:24.857Z
Answers.Text: Grah! I knew I saw something about that somewhere. Thanks.
Answers.UserDisplayName: Tim Kelty
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2014-09-18T22:26:05.327Z
Answers.Text: Based on the comments in `/craft/app/etc/config/defaults/general.php`, it looks like I don't _also_ have to set `usePathInfo` if I set `'omitScriptNameInUrls' => true`
  
  Wonderful!
Answers.UserDisplayName: Tim Kelty
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2015-02-27T17:02:56.393Z
Answers.Text: I've added that in my general.php, yet index.php?p=my-page remains. Its only on production, not dev or local. Any ideas? example.com/my-page works on all environments.
Answers.UserDisplayName: Doug
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2015-02-27T17:33:19.787Z
Answers.Text: update: I am using a 'maintenance mode' that blocks access based on IP address on production. That has a setting in the index.php file and if on uses another file to check access by IP. That process may affect removing index.php. I disabled that, cleared Craft caches, and URLs no longer have index.php.
Answers.UserDisplayName: Doug
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2014-09-18T21:46:22.660Z
Answers.LastActivityDate: 2014-09-18T21:46:22.660Z
Answers.UserDisplayName: Brad Bell
Body: <p>Cross-posting from <a href="https://github.com/themccallister/craft.cache-clear/issues/2" rel="nofollow">here</a>, as I'm not sure if this is a Craft issue or specific to the <code>cache-clear</code> plugin.</p>
  
  <p>Intermittently (twice in a day now), I've seen templates being cached with Craft URLs outputting as either <code>/index.php/my-page/</code> or <code>/index.php?p=my-page</code></p>
  
  <p>Once this happens, clearing cache via the plugin url (<a href="http://domain.com/actions/cacheClear/clear?key=myKey" rel="nofollow">http://domain.com/actions/cacheClear/clear?key=myKey</a>) doesn't seem to fix anything, but clearing cache in the control panel does.</p>
  
  <p>Any ideas?</p>
  
Tags: <url><cache>
Title: Craft URLs intermittently being cached as /index.php/my-page/ or /index.php?p=my-page
ThreadText: # Craft URLs intermittently being cached as /index.php/my-page/ or /index.php?p=my-page
  
  (Asked by: username_0 on 2014-09-18)
  
  Cross-posting from [here](https://github.com/themccallister/craft.cache-clear/issues/2), as I'm not sure if this is a Craft issue or specific to the `cache-clear` plugin.
  
  Intermittently (twice in a day now), I've seen templates being cached with Craft URLs outputting as either `/index.php/my-page/` or `/index.php?p=my-page`
  
  Once this happens, clearing cache via the plugin url (<http://domain.com/actions/cacheClear/clear?key=myKey>) doesn't seem to fix anything, but clearing cache in the control panel does.
  
  Any ideas?
  
  **Tags:** url, cache
  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_1 on 2014-09-18. Score: 2 | Accepted answer
  
  There is an explanation of why this can occur on the Craft help section here: <http://buildwithcraft.com/help/why-index.php>
  
  > **Comments:**
  > **username_0**: Grah! I knew I saw something about that somewhere. Thanks.  
  > **username_0**: Based on the comments in `/craft/app/etc/config/defaults/general.php`, it looks like I don't _also_ have to set `usePathInfo` if I set `'omitScriptNameInUrls' => true`  Wonderful!  
  > **username_2**: I've added that in my general.php, yet index.php?p=my-page remains. Its only on production, not dev or local. Any ideas? example.com/my-page works on all environments.  
  > **username_2**: update: I am using a 'maintenance mode' that blocks access based on IP address on production. That has a setting in the index.php file and if on uses another file to check access by IP. That process may affect removing index.php. I disabled that, cleared Craft caches, and URLs no longer have index.php.  
  
  ---
  
  