我最近设置了一个magento商店,URL是mydomain.com/index.php/admin或mydomain.com/index.php/about-us。我想删除的index.php,我用Google搜索这个码应该如何,我找到了工作方法,但它并不:在.htaccess中删除Magento URL中的Index.php
<IfModule mod_rewrite.c>
############################################
## enable rewrites
Options +FollowSymLinks
RewriteEngine on
############################################
## you can put here your magento root folder
## path relative to web root
RewriteBase/
############################################
## workaround for HTTP authorization
## in CGI environment
RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}]
############################################
## always send 404 on missing files in these folders
RewriteCond %{REQUEST_URI} !^/(media|skin|js)/
############################################
## never rewrite for existing files, directories and links
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-l
############################################
## rewrite everything else to index.php
RewriteRule .* index.php [L]
</IfModule>
感谢。
所以你说我上面发布的代码已经取消了index.php网址?我有mod_rewrite启用。 – ratman2050
这就是我所说的。是的 - >你也使用'RewriteEngine on'吗?这是必需的。 – Zak
请参阅编辑答案。 – ratman2050