Magento – Remove index.php from links in admin panel

admin

When I login to admin panel I get sent to:
http://example.com/index.php/admin/index/index/key/**********

and get 404 error

but when I remove "/index.php" from the url:
http://example.com/admin/index/index/key/**********

it works but every time I click a link in admin panel the index.php comes back

I am pretty much having the opposite problem as this guy:
https://stackoverflow.com/questions/10474740/how-to-remove-index-php-from-urls

whereas his links did not add index.php to the url, but his pages required them, my links are adding index.php to the url when the pages do not accept them

Best Answer

I gave up on finding help online, so I took it upon myself to find the answer. I eventually made an edit that fixed everything also note, if you have magento installed in a subdirectory, make sure folders that contain the magento installation do not have an .htaccess of their own or else it will conflict with the .htaccess in your magento root

Here is my magento root .htaccess:

   DirectoryIndex index.php

<IfModule mod_php5.c>

    php_value memory_limit 256M
    php_value max_execution_time 18000

    php_flag magic_quotes_gpc off

    php_flag session.auto_start off

    php_flag suhosin.session.cryptua off

    php_flag zend.ze1_compatibility_mode Off

</IfModule>

<IfModule mod_security.c>

    SecFilterEngine Off
    SecFilterScanPOST Off
</IfModule>

<IfModule mod_deflate.c>

</IfModule>

<IfModule mod_ssl.c>

    SSLOptions StdEnvVars

</IfModule>

<IfModule mod_rewrite.c>

    Options +FollowSymLinks
    RewriteEngine on

    RewriteBase /

    RewriteRule ^api/rest api.php?type=rest [QSA,L]

    RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}]

    RewriteCond %{REQUEST_METHOD} ^TRAC[EK]
    RewriteRule .* - [L,R=405]

    RewriteCond %{REQUEST_URI} !^/(media|skin|js)/

    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteCond %{REQUEST_FILENAME} !-l

    RewriteRule .* index.php [L]

</IfModule>

    AddDefaultCharset Off

<IfModule mod_expires.c>

    ExpiresDefault "access plus 1 year"

</IfModule>

    Order allow,deny
    Allow from all

    <Files RELEASE_NOTES.txt>
        order allow,deny
        deny from all
    </Files>

RewriteRule ^index.php/(.*)$ [L] 
Related Topic