<p>In this case, the Apache <code>mod_rewrite</code> module wasn't installed, so the <code>&lt;IfModule mod_rewrite.c&gt;</code> block of Craft's default <code>.htaccess</code> file was being skipped not allowing <code>index.php</code> to be rewritten in the URL.</p>

CC BY-SA 3.0
2016-09-19T22:27:48.140Z
2016-09-19T22:27:48.140Z
Brad Bell
<p>I am having the same issue as here: <a href="https://craftcms.stackexchange.com/questions/9960/another-index-phpp-problem">Another index.php?p= problem</a> </p>

<p>I tried to post this as a comment rather than open another post but I don't have enough reputation...</p>

<p>I have tried all of the suggestions listed and none of them are working. Without index.php I get 404's.  </p>

<p>I've tried with the rule applied to the config file it breaks the admin (doesn't load asset files like css - they're still pointing to URLs with index.php) and I still get 404's on the entry URLs. </p>

<p>I also double checked with the hosting company on the apache configurations and the <code>AllowOverride All</code> is indeed set.</p>

<p>Here is my htaccess file:</p>

<pre><code>&lt;IfModule mod_rewrite.c&gt;
    RewriteEngine On

    # Send would-be 404 requests to Craft
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteCond %{REQUEST_URI} !^/(favicon\.ico|apple-touch-icon.*\.png)$ [NC]
    RewriteRule (.+) index.php?p=$1 [QSA,L]
&lt;/IfModule&gt;
</code></pre>

<p>I did try to add <code>RewriteBase /</code> just below <code>RewriteEngine On</code> and nothing happened. I also verified the file is actually working by adding invalid stuff in it and getting a server error.</p>

<p>I've tried this in my general.php config file:</p>

<pre><code>return array(
    'omitScriptNameInUrls' =&gt; true,
);
</code></pre>

<p>And this version:</p>

<pre><code>return array(
    '*' =&gt; array (
        'omitScriptNameInUrls' =&gt; true
    )
);
</code></pre>

<p>When I do, it doesn't fix the index.php issue, but it removes index.php from the admin, but breaks the admin because the assets 404 (mentioned above).</p>

<p>Any other suggestions out there?</p>

<p>Thanks!</p>

CC BY-SA 3.0
2016-09-15T22:55:15.100Z
What happen if you go to `http://yourdomain.com/index.php/testPathInfo`?
Brad Bell
CC BY-SA 3.0
2016-09-15T23:00:05.407Z
I get the "success" message, forgot to mention I tried that one too :/ (just checked again to be sure ;) )
ByteMyPixel
CC BY-SA 3.0
2016-09-15T23:13:16.260Z
Do you have any `.htaccess` files in folders above Craft's `.htaccess` file?
Brad Bell
CC BY-SA 3.0
2016-09-15T23:19:49.127Z
I don't, here is a screenshot of the folder structure on the server: [link](https://www.dropbox.com/s/l4hsuimzkgfpgqm/Screenshot%202016-09-15%2017.19.15.png?dl=0)
ByteMyPixel
CC BY-SA 3.0
2016-09-16T01:22:06.577Z
Hrm... forgive me if this sounds stupid, but you are running Apache?
Brad Bell
CC BY-SA 3.0
2016-09-16T14:51:37.083Z
np :) it is - Apache/2.4.10
ByteMyPixel
CC BY-SA 3.0
2016-09-16T22:32:31.790Z
Hrm... running out of ideas.  If you want to send some CP/FTP credentials to support@craftcms.com, we can take a look at it and update here with any results.
Brad Bell
<config><htaccess><index>
Cannot remove index.php from URLs either
# Cannot remove index.php from URLs either

(Asked by: username_0 on 2016-09-15)

I am having the same issue as here: Another index.php?p= problem 
I tried to post this as a comment rather than open another post but I don't have enough reputation...
I have tried all of the suggestions listed and none of them are working. Without index.php I get 404's.  
I've tried with the rule applied to the config file it breaks the admin (doesn't load asset files like css - they're still pointing to URLs with index.php) and I still get 404's on the entry URLs. 
I also double checked with the hosting company on the apache configurations and the AllowOverride All is indeed set.
Here is my htaccess file:

    RewriteEngine On

    # Send would-be 404 requests to Craft
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteCond %{REQUEST_URI} !^/(favicon\.ico|apple-touch-icon.*\.png)$ [NC]
    RewriteRule (.+) index.php?p=$1 [QSA,L]


I did try to add RewriteBase / just below RewriteEngine On and nothing happened. I also verified the file is actually working by adding invalid stuff in it and getting a server error.
I've tried this in my general.php config file:
return array(
    'omitScriptNameInUrls' => true,
);

And this version:
return array(
    '*' => array (
        'omitScriptNameInUrls' => true
    )
);

When I do, it doesn't fix the index.php issue, but it removes index.php from the admin, but breaks the admin because the assets 404 (mentioned above).
Any other suggestions out there?
Thanks!

**Tags:** config, htaccess, index
> **Comments:**
> **username_1**: What happen if you go to `http://yourdomain.com/index.php/testPathInfo`?  
> **username_0**: I get the "success" message, forgot to mention I tried that one too :/ (just checked again to be sure ;) )  
> **username_1**: Do you have any `.htaccess` files in folders above Craft's `.htaccess` file?  
> **username_0**: I don't, here is a screenshot of the folder structure on the server: [link](https://www.dropbox.com/s/l4hsuimzkgfpgqm/Screenshot%202016-09-15%2017.19.15.png?dl=0)  
> **username_1**: Hrm... forgive me if this sounds stupid, but you are running Apache?  
> **username_0**: np :) it is - Apache/2.4.10  
> **username_1**: Hrm... running out of ideas.  If you want to send some CP/FTP credentials to support@craftcms.com, we can take a look at it and update here with any results.  

---

## 1 answers

### Answer by username_1 on 2016-09-19. Score: 4 | Accepted answer

In this case, the Apache `mod_rewrite` module wasn't installed, so the  block of Craft's default `.htaccess` file was being skipped not allowing `index.php` to be rewritten in the URL.


---

