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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T19:29:53+00:00 2026-05-23T19:29:53+00:00

I made a regex route to route any segment to category except 2 values

  • 0

I made a regex route to route any segment to category except 2 values (home or about).
Now the problem I have is that when a user browses to my base url it also routes to category.

I’ve looked around and I can’t find a way to add an exception to my regex so that the homepage routes to index instead of category controller.

This is my code

<archive type="Zend_Controller_Router_Route_Regex">

    <route>(^(?!home$|about$).*$)</route>

    <defaults>
        <controller>category</controller>
        <action>index</action>
    </defaults>

    <reverse>%s</reverse>

</archive>`

if I add index or default to my exceptions it still routes to category

  • 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-05-23T19:29:54+00:00Added an answer on May 23, 2026 at 7:29 pm

    Add a static route that maps empty url to your index controller and action.

    <home type="Zend_Controller_Router_Route_Static">
    
        <route></route>
    
        <defaults>
            <controller>index</controller>
            <action>index</action>
        </defaults>
    
    </home>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a simple problem: I want to construct a regex that matches a
I need to validate phone number in PHP. I have made following regex, but
I have made a program that continuously monitors a log file. But I don't
I have already made a regex which should work, but it doesn't work. echo
I have two modules that should over ride other urls, basically /management/category/edit/id/1 (Edit Category
I have this problem which made my scratch my head: Is there a way
I have made a function that validates inputs with for different kind of strings.
I'm using C# and .NET and I have a Regex that looks like this
Hi I have a ruby regex I made usinig Rubular http://rubular.com/r/RRc8twB6NL which is meant
I made an article spinner that used regex to find words in this syntax:

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.