<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>

CC BY-SA 3.0
2014-09-18T22:21:24.857Z
Grah! I knew I saw something about that somewhere. Thanks.
Tim Kelty
CC BY-SA 3.0
2014-09-18T22:26:05.327Z
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!
Tim Kelty
CC BY-SA 3.0
2015-02-27T17:02:56.393Z
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.
Doug
CC BY-SA 3.0
2015-02-27T17:33:19.787Z
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.
Doug
CC BY-SA 3.0
2014-09-18T21:46:22.660Z
2014-09-18T21:46:22.660Z
Brad Bell
<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>

<url><cache>
Craft URLs intermittently being cached as /index.php/my-page/ or /index.php?p=my-page
# 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.  

---

