Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9303647
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 18, 20262026-06-18T23:32:01+00:00 2026-06-18T23:32:01+00:00

I have created one defaultcontroller which is given below namespace Mytest\VameBundle\Controller; use Symfony\Bundle\FrameworkBundle\Controller\Controller; use

  • 0

I have created one defaultcontroller which is given below

namespace Mytest\VameBundle\Controller;

use Symfony\Bundle\FrameworkBundle\Controller\Controller;
use Symfony\Component\HttpFoundation\Response;

class DefaultController extends Controller
{
public function indexAction()
{
    return $this->redirect($this->generateUrl('home'));
}

public function myactionAction($name)
{
    return new Response('<html><body>'.$name.'</body></html>');
}

}

The routing file is as look like bellow.

use Symfony\Component\Routing\RouteCollection;
use Symfony\Component\Routing\Route;


$collection = new RouteCollection();

$collection->add('name', new Route('/vame',array(
    '_controller' => 'MytestVameBundle:Default:index',
    )));

$collection->add('home', new Route('/vame/{name}',array(
    '_controller' => 'MytestVameBundle:Default:myaction',
    'name' => 'hhhhhhhhhh',

)));

return $collection;

It shows the following error

The page isn’t redirecting properly

What i want to do is once the default controller is called with index action it will redirect to myaction Action with one argument.

so please any help…

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-18T23:32:02+00:00Added an answer on June 18, 2026 at 11:32 pm

    Your app redirects the request in a way that will never complete. So you have some kind of redirection loop.

    It seems that your code is OK. However your should not hardcode parameters in the routing file but like this

    $this->redirect($this->generateUrl('home', array('name' => 'test')));
    

    Do you have more routing definitions? Maybe they interfere each other. Can you post your log?

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have created one table using the below command: create table Table1( Id int
I have created one simple extension in Google chrome, below is my manifast.json {
I have created one application which is reading outlook mail, but when user install
I have created one service in my android project which runs separately in process
I have created one android app in which I am starting a service by
I have created one windows service which send an email notifications to users (list
I have created one application in which I want to start service when application
I have created one alarm clock application. In which, when user clicks on the
i have created one view Controller(A) and this controller is using as a view
I have created one filter which is working fine for all requests which my

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.