Magento – Remove index.php from admin url on live server

adminmagento-1.7

I am trying to resolve this problem form 2 day ago but i cant success to resolved it

I given all details of this problem

we have magento installed on root directory i.e public_html on live server

.htaccess file of server is something like this,

AddHandler application/x-httpd-php52 .php5 .php .php3 .php2 .phtml
AddType application/x-httpd-php5 .php52 .php .php3 .php2 .phtml

RewriteEngine on


Options +FollowSymLinks +ExecCGI

<IfModule mod_rewrite.c>
  # we skip all files in /web
  RewriteCond %{REQUEST_URI} ^/zimode/
  RewriteRule .* - [L]

  # we rewrite all other files with .something to /web
  RewriteCond %{REQUEST_URI} \..+$
  RewriteCond %{REQUEST_URI} !\.html$
  RewriteRule ^(.*)$ /zimode/$1 [L]

  # !!! UNTESTED !!! ##################################
  # we check if the .html version is in /web (caching)
  #RewriteRule ^$ /zimode/index.html [QSA]
  #RewriteRule ^([^.]+)$ /zimode/$1.html [QSA]
  #####################################################

  # no, so we redirect to our front web controller
  RewriteRule ^(.*)$ /zimode/[QSA,L]

</IfModule>

What i had already try to resolve it as,

i had enabled mod_rewrite using admin panel.

try to install admin url module which remove index.php from admin url.

Note:

xyz.com/admin/

when i hit above url i see admin login panel i am login successful but got

page not found

404 error occurred….

and now url changed something like xyz.com/index.php/admin/......

when i remove that index.php from url it works

So any one have any idea? How to resolve it.

Waiting for your answer… Thanks in Advance.

Best Answer

  1. First of you have to enable mod_rewrite apache server.

    How enable mod_rewrite for Apache?

  2. then Go to Admin -> System-> Configuration

  3. Under configuration -> Web -> Search Engine Optimization settings Use Web Server Rewrites->select Yes

  4. click Save Config Button.

  5. Then Go to Cache management page (system cache management ) and refresh your cache and refresh to check the site.

Related Topic