<p>Could you double check your General Settings (<strong>Settings</strong> > <strong>General</strong>) to make sure there's no "/index.php" in the Site URL field?</p>

CC BY-SA 3.0
2017-02-21T16:21:11.057Z
2017-02-21T18:02:19.607Z
2017-02-21T18:02:19.607Z
Matt P
<p>I already had this question posted but I didn't include enough relevant information so I deleted it and here I go again...</p>

<p>I have a weird issue currently on my Craft setup. I have removed index.php from my URLs, so all my single-page links are loading via www.siteurl.com/about-us etc...</p>

<p>The issue I'm having now is that when I created a new single page section, index.php isn't being removed from the URL. It's the only section doing this on the entire site, and everything is perfectly the same as the other sections.</p>

<p>I'm going to run through my setup in case anyone can spot what the issue is.</p>

<p>I currently have a <code>.htaccess</code> file within my project foot folder. The contents of that are here:</p>

<pre><code>RewriteEngine On
RewriteBase /
RewriteRule ^(.*)$ /public/$1 [L]
</code></pre>

<p>Then inside my public folder, (which is the same level as the Craft folder) I have another .htaccess, with the contents from <a href="https://craftcms.com/support/remove-index.php" rel="nofollow noreferrer">https://craftcms.com/support/remove-index.php</a>.</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>This setup works perfectly for the entire site, except the new section I created. Does anyone know what the issue could or might be?</p>

<p>I've went into my Apache <code>http.conf</code> file and made sure the </p>

<pre><code> LoadModule rewrite_module modules/mod_rewrite.so
</code></pre>

<p>is enabled. </p>

<p>and</p>

<pre><code>AllowOverride All
</code></pre>

<p>is set.</p>

<p>Also inside my general.php file I have added, </p>

<pre><code>'omitScriptNameInUrls' =&gt; true,
</code></pre>

<p>But when I push this up to my staging server, the same issue is there. So I assume the default Apache configuration is correct.</p>

<p>The really weird issue is why it works across the entire site except the one new section.</p>

CC BY-SA 3.0
2017-02-20T15:45:30.490Z
Dammit. I knew this is a really difficult question :(
Davabo
<url><sections><index>
Removing index.php strange issue
# Removing index.php strange issue

(Asked by: username_0 on 2017-02-13)

I already had this question posted but I didn't include enough relevant information so I deleted it and here I go again...
I have a weird issue currently on my Craft setup. I have removed index.php from my URLs, so all my single-page links are loading via www.siteurl.com/about-us etc...
The issue I'm having now is that when I created a new single page section, index.php isn't being removed from the URL. It's the only section doing this on the entire site, and everything is perfectly the same as the other sections.
I'm going to run through my setup in case anyone can spot what the issue is.
I currently have a .htaccess file within my project foot folder. The contents of that are here:
RewriteEngine On
RewriteBase /
RewriteRule ^(.*)$ /public/$1 [L]

Then inside my public folder, (which is the same level as the Craft folder) I have another .htaccess, with the contents from https://craftcms.com/support/remove-index.php.

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]


This setup works perfectly for the entire site, except the new section I created. Does anyone know what the issue could or might be?
I've went into my Apache http.conf file and made sure the 
 LoadModule rewrite_module modules/mod_rewrite.so

is enabled. 
and
AllowOverride All

is set.
Also inside my general.php file I have added, 
'omitScriptNameInUrls' => true,

But when I push this up to my staging server, the same issue is there. So I assume the default Apache configuration is correct.
The really weird issue is why it works across the entire site except the one new section.

**Tags:** url, sections, index
> **Comments:**
> **username_0**: Dammit. I knew this is a really difficult question :(  

---

## 1 answers

### Answer by username_1 on 2017-02-21. Score: 1

Could you double check your General Settings (**Settings** > **General**) to make sure there's no "/index.php" in the Site URL field?


---

