我想从前端删除index.php,而不是在Magento的后端。请有人帮我解决这个问题。只从前端删除index.php不在后端magento
我们尝试通过以下部分使用.htaccess来解决此问题。
<pre>
RewriteCond %{HTTP_HOST} ^example.com$ [NC]
RewriteRule ^(.*)$ http://www.example.com/$1 [R=301,L]
RewriteCond %{HTTP_HOST} !^www\.
RewriteRule ^(.*)$ http://www.%{HTTP_HOST}/$1 [R=301,L]
RewriteCond %{THE_REQUEST} ^[A-Z]{3,}\s/+index\.php(/[^\s\?]+)? [NC]
RewriteRule^%1/ [L,R=301]
</pre>
但在使用此代码后,它会在管理网址中添加额外的反斜杠,从而在管理类别部分中创建问题。我无法扩展所有类别。
如果我使用下面的解决方案,那么它也从管理网址中删除index.php。