0

I have a custom module for contact us in my Magento site.

1) config.xml is like following

<?xml version="1.0"?>
---
---
---
<frontend>
    <routers>
        <requestcatalogue>
            <use>standard</use>
            <args>
                <module>Namespace_Requestcatalogue</module>
                <frontName>requestcatalogue</frontName>
            </args>
        </requestcatalogue>
    </routers>
    <layout>
        <updates>
            <requestcatalogue>
                <file>requestcatalogue.xml</file>
            </requestcatalogue>
        </updates>
    </layout>
</frontend>   
<admin>
    <routers>
        <adminhtml>
            <args>
                <modules>
                    <adminrequestcatalogue before="Mage_Adminhtml">Namespace_Requestcatalogue_Adminhtml</adminrequestcatalogue>
                </modules>
            </args>
        </adminhtml>
    </routers>
</admin>

2) There is a link in the phtml file as following

  <li class=" ">
    <a title="<?php echo $this->__('Contact Us') ?>" href="<?php echo $this->getUrl('contact') ?>"><?php echo $this->__('Contact Us') ?></a>
    </li>

3) Form action is as following

<form method="post" id="ContactusForm" action="http://localhost/mymagento/contactus/index/post/">

4) controller post action is like following

public function postAction()
{
    -----
    -----
    -----
    $this->_redirect('*/*/');  // on successful submission
    return;
    ----

5) There is a url rewrite in admin as following

screenshot

My question is when I submit the form successfully the page url in the browser is appended with index.

before form submission page url

http://localhost/mymagento/contactus

after submission page url

http://localhost/mymagento/contactus/index/

How do I remove this index appended in the last from the url?

Update : Recently I applied SUPEE-6788 patch to site, before that it was working correctly.

1 Answer 1

1

Try this

4) controller post action is like following

public function postAction()
{
    -----
    -----
    -----
    $this->_redirect('contactus');  // on successful submission
    return;
    ----

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.