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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 7, 20262026-06-07T21:37:50+00:00 2026-06-07T21:37:50+00:00

How do I remove index from http://localhost/dashboard/index/create I have my urlManager setup like this:

  • 0

How do I remove index from http://localhost/dashboard/index/create

I have my urlManager setup like this:

'urlManager' => array(
     'urlFormat' => 'path',
     'showScriptName' => false,
     'rules' => array(
         '<controller:\w+>/<id:\d+>' => '<controller>/view',
         '<controller:\w+>/<action:\w+>/<id:\d+>' => '<controller>/<action>',
         '<controller:\w+>/<action:\w+>' => '<controller>/<action>',
     ),
 ),

And this gives me clean URLs like this http://localhost/dashboard where dashboard is a module with a default controller named indexController.

Now, the problem I am having is that I cannot access other actions of the module controller without first putting index e.g If I want to call actionCreate inside indexController, I always have to say http://localhost/dashboard/index/create.

Is there any way I can get rid of index and just call it like this: http://localhost/dashboard/create?

This is how my module is configured in main.php :

'modules' => array(
    ...
    'dashboard' => array(
        'defaultController' => 'index'
    ),
    ...
),

Thank you in advance 🙂

  • 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-07T21:37:52+00:00Added an answer on June 7, 2026 at 9:37 pm

    Try arranging your array like this (put the line beginning with dashboard under your urlManager component):

    array(
      ...
      'components' => array(
        ...
        'urlManager' => array(
          ...
            'rules' => array(
              'dashboard/<action:\w+>' => 'dashboard/index/<action>'
          ),
        ),
      ),
    );
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

hi i have multidimensional array in php i want to remove an index from
I have a URL structure like this http://domain.com/page/thing1 http://domain.com/page/thing2 http://domain.com/page/thing3 I want to: remove
So I am trying to remove index.php from address using this manual: http://dev.lohv.eu/1/user_guide/general/urls.html Atm
i have this URI. http://localhost/index.php?properties&status=av&page=1 i am fetching basename of the URI using following
I have a problem like,array with 0 10 indexes and i removed 0th index
I am trying to remove Details from http://localhost:1985/Materials/Details/2/Steel but some how my route doesn't
I want to configure Kohana 2.x to have links in this format: http://localhost/mysite/web/admin/support instead
Currently, I have 20+ URLs on my site in this format http://www.example.net/content/index/mission I want
Writing htaccess that allows me to remove index.php from the URL can confuse search
I want to remove the string code=hads1328fas& on my URL, so that BEFORE http://example.com/main/index.php?code=hads1328fas&store=food#home

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.