Did a little stupid thing the other day by removing index.php through control panel but not .htaccess. Now I can't access CP, and I need to add back index.php through the file, sort of manual way.

I'm developing locally and If I remove index.php through htaccess too it redirects to localhost:8888/admin.php

<IfModule mod_rewrite.c>
        RewriteEngine On
        RewriteBase /

        # Removes index.php from ExpressionEngine URLs
        RewriteCond %{THE_REQUEST} ^GET.*index\.php [NC]
        RewriteCond %{REQUEST_URI} !/system/.* [NC]
        RewriteRule (.*?)index\.php/*(.*) /$1$2 [R=301,NE,L]

        # Directs all EE web requests through the site index file
        RewriteCond %{REQUEST_FILENAME} !-f
        RewriteCond %{REQUEST_FILENAME} !-d
        RewriteRule ^(.*)$ /index.php/$1 [L]

But because I have the site inside folders etc and have other projects I cannot have this site in root directory as localhost:8888

My current URL is http://localhost:8888/sitename/ee/admin.php

How can I turn back index.php but the manual way.

I hope this makes sense.

1 Answer 1


Set, in your $config.php file

$config['index_page'] = "index.php";

That will override anything else that was previously set.

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.