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 7736419
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 1, 20262026-06-01T07:43:35+00:00 2026-06-01T07:43:35+00:00

I want to redirect my ‘/’ uri to a given controller’s action. I used

  • 0

I want to redirect my ‘/’ uri to a given controller’s action. I used to do it via the following code in UrlMappings.groovy:

"/"(action: "highlights", controller: "project")

However, this does not rewrite the url in the browser. It redirects to the correct controller’s action, but the browser’s navigation Url is still at myProject/. I would like it to be updated to the “correct” uri so that reloads, etc. use the “correct” uri.

I tried:

"/"(uri: "/project/highlights")

but I get a status 404 response.

Any suggestions on how I should proceed?

  • 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-01T07:43:36+00:00Added an answer on June 1, 2026 at 7:43 am

    UrlMappings is only for how to map the url to your controller.action. It won’t do any redirect.
    If you want to do url redirect, you probably need to setup a http server like apache in front of your application server or the easier way is to just setup a controller.action to do the redirect manually.

    "/"(action: "redirect", controller: "project")
    

    In the project controller, and redirect action, just redirect the user to your highlights action.

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

Sidebar

Related Questions

I want to redirect from an action in one controller to an action in
i want to redirect to another action in same controller. how can we achieve
I want to redirect the following http://www.example.com/folder/index.php?dir=Dir1 http://www.example.com/folder/index.php?dir=Dir1/Dir2 to http://www.example.com/folder/Dir1 http://www.example.com/folder/Dir1/Dir2 I want to
I'm new to Codeigniter, and I want redirect to a controller after the validation
I want redirect my getJSON response to another html page below is the code
i have a <select> tag i want redirect user onchange i got an code
I want to redirect a user who gets from page.php?letter=A&num=2 to the following address:
I want redirect to error page when exception occured. If the code is not
i want to redirect from action a to action b in the same module.
I want to redirect http://www.example.com to http://example.com via .htaccess. I've found and tried below

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.