I have following code in my .htaccess

RewriteEngine On

    # Removes index.php from ExpressionEngine URLs
    RewriteCond $1 !\.(gif|jpe?g|png)$ [NC]
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule ^(.*)$ /index.php?/$1 [PT]

That redirect works on all pages apart homepage is there any way to remove index.php from homepage?


EE 2.x

Go in to your general settings in your Control Panel.

(Site Name) -> CP Home -> Administration -> General Configuration

Remove index.php from the URL to the root directory of your site setting.

Docs: https://docs.expressionengine.com/v2/cp/admin/general_configuration.html

EE 3.x

If it's EE 3.x, I believe you edit the Website index page setting that lives on URL and Path Settings page and remove index.php from that.

Docs: https://docs.expressionengine.com/latest/cp/settings/urls.html

| improve this answer | |
  • Hi jrothafer Thank you for your help unfortunately that does not work. I did that some time ago I have cleared the cache after that and still nothing. This is EE 2.0 and system folder is not in root directory. Do you have any other suggestions? – Bartosz Jul 14 '16 at 14:49
  • I Have found in Config file editor -> $config['cp_url'] that has index.php , will I change that ? – Bartosz Jul 14 '16 at 15:02

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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