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.

<IfModule mod_rewrite.c>
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.


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.

  • Dammit. I knew this is a really difficult question :(
    – Davabo
    Commented Feb 20, 2017 at 15:45

1 Answer 1


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

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.