Im trying to perform a redirect to a component's view

 <form role="form" action="<?php echo JRoute::_('index.php?option=com_rouf&view=front');  ?>">

Because SEF is enabled im getting redirected at :


and i get The page isn't redirecting properly error.

I never user SEF before but i would like to keep it, so how i perform the redirects at the views when SEF is enabled ?

  • Is com_rouf a custom component you built?
    – Kitase88
    Commented Dec 18, 2015 at 11:57
  • yes it is a custom component
    – sin
    Commented Dec 18, 2015 at 12:03

1 Answer 1


The correct way to do that and to accomplish more complicated tasks is to add a router file in /components/com_rouf/router.php with a class that will manage your custom routing.

Take a look at the com_content/router.php to have an idea and I suggest you to read this article: https://docs.joomla.org/Supporting_SEF_URLs_in_your_component

Anyway if the page you're going to redirect is a menu item, add the Itemid parameter to the link with the related menu item id, for a simple fix.

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.