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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T22:41:33+00:00 2026-05-23T22:41:33+00:00

i have a problem to rewrite 2 parameters that are on the same place

  • 0

i have a problem to rewrite 2 parameters that are on the same place in a URL.

i want the following URL Structure:
category (No page or letetr is set)
category/page-2 (different page from page 1)
category/e/page-2 (letter and page is set)

The problem is that my second rule is ignored. 🙁

Here is my code:

    RewriteRule ([^/.]+)/([^/.]+)$ index.php?cat=$1&letter=$2 [L,NC]
    RewriteRule ([^/.]+)/page-([^/.]+)$ index.php?cat=$1&page=$2 [L,NC]
    RewriteRule ^([^/.]+)$ index.php?cat=$1 [L,NC]
  • 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-23T22:41:34+00:00Added an answer on May 23, 2026 at 10:41 pm

    Your second rule isn’t being ignored. Instead, anything that matches the second rule will also match the first rule, so the first rule is processed instead (and the [L] modifier prevents further processing).

    Basically, the second rule is the same as the first, but with the additional condition that the characters page- must also exist between the two captured sections. This page- portion matches the ([^/.]+) condition of the first rule, so it will be matched when the first RewriteRule is processed.

    Try reversing the order of the first two rules.

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

Sidebar

Related Questions

I have the following problem: I use a script that saves the referer URL.
I have a web page with basicly the following URL structure: www.example.com/main.php?userId=mattias.wolff www.example.com/definitions.php?userId=mattias.wolff www.example.com/tasks.php?userId=mattias.wolff
I have problem with fancybox. I want to write a function that will run
Greetings, here is the problem. I have a page called entList.jsp , that works
I have a database that has a url colomn like this-is-the-title.php I want to
I have a strange problem with mod_rewrite, the rules that are relevant here are:
I have problem in some JavaScript that I am writing where the Switch statement
I have problem with return statment >.< I want to store all magazine names
----EDIT--- I have just realized that my explanation of the problem was missing an
I have a button on a page with an onClick I dynamically set via

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.