如何在 Magento 中使用带有索引的 geturl.php


how to use geturl with an index.php in magento?

标题似乎不清楚。 现在这是我的问题。我使用Windows,我需要运行带有"索引.php"的Magento。示例:"localhost/magentoproject/index.php/test/index/save"

现在我在这样的表单上使用 getUrl 函数

<?php echo Mage::getUrl('test/index/save')?>

但是经过我检查,网址显示如下

localhost/magentoproject/test/index/save

出现的URL不包括索引.php,因此,Magento显示404未找到。

我如何解决这个问题? 如何使用 geturl 包括"索引.php"。目前我在表单上使用这样的硬代码

http://localhost/magentoproject/index.php/test/index/save
  1. 转到您网站的管理员网址。
  2. 接下来转到System > configuration > web > Search引擎优化
  3. 然后将Use Web Server Rewrites值设置为"否"