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

  • Home
  • SEARCH
  • 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 8160769
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 6, 20262026-06-06T18:21:08+00:00 2026-06-06T18:21:08+00:00

I currently have url like localhost/zend_practice/countries/index?data=1 where countries is the name of my controller

  • 0

I currently have url like localhost/zend_practice/countries/index?data=1 where countries is the name of my controller and index is name of my action.
I would like to have url like localhost/zend_practice/countries/index/data/1.
Also a rule to accept numbers only for the get parameter ‘data’.
How can i do this for ‘countries’ controller only (not for my other controller)?

  • 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-06T18:21:09+00:00Added an answer on June 6, 2026 at 6:21 pm

    Zend Framework by default takes url as

    /controller/action/parameter_name/parameter_value

    You can directly use your url as

    /countries/index/data/1

    and in the code you can get the data parameter and apply your logic as required.
    Here’s a snippet.

    class CountriesController extends Zend_Controller_Action{
        public function indexAction(){
            //capture the data parameter
            $data = $this->_request->getParam('data');
            //check data if numeric
            if(is_numeric($data)){
                //your code goes here....
            }
    
        }
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Global.asax route values routes.MapRoute( Default, // Route name {controller}/{action}/{id}, // URL with parameters new
I currently have Spring configured to use HSQL, but I would like to use
I currently have the following CSS (called splash.css): html { background:url(splash.jpg) center no-repeat; background-size:auto
I currently have a DetailView for Django's built-in User . url( r'^users/(?P<pk>\d+)/$', DetailView.as_view( model
I'm using Intelligencia url rewriting currently but have just leased an IIS 7.5 server
I have it currently so that my post title links to an external URL
Currently have password protection on my main and sub directories, however I'd like to
I have a directory named dollars that contains a file index.php . I would
I would like to know how I can make the url's for the categories
I am developing a stats site in Codeigniter locally. I have a url like

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.