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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 16, 20262026-05-16T15:47:48+00:00 2026-05-16T15:47:48+00:00

I have two problems in my current .htaccess. The script below works but has

  • 0

I have two problems in my current .htaccess. The script below works but has a limitation

RewriteRule ^products/([0-9])$ /products/$1/ [R]
RewriteRule ^products/([0-9])/$ /viewad.php?adid=$1

Limitation: if adid, is more than 10. it fails. I want it to have whatever number still there and work. my current solution was to add this everytime the id went higher than range.

RewriteRule ^products/([0-9][0-9])$ /products/$1/ [R]
RewriteRule ^products/([0-9][0-9])/$ /viewad.php?adid=$1 

Could some one refine or explain how to correct this rule to take numbers out of range.

Problem Two.
Mapping multiple $_GET variables.

say i had a url like this

http://veepiz.com/africanews.php?app=view&func=viewcategory&categoryid=2&page=1

what rule would i write to have it in this format.

http://veepiz.com/africanews/category/2/page/1

or

http://veepiz.com/africanews/2/1

Thanx a lot for your time

  • 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-16T15:47:49+00:00Added an answer on May 16, 2026 at 3:47 pm

    First problem:

    RewriteRule ^products/([0-9]+)$ /products/$1/ [R]
    RewriteRule ^products/([0-9]+)/$ /viewad.php?adid=$1
    

    Or better yet:

    RewriteRule ^products/(\d+)/?$ /viewad.php?adid=$1
    

    Problem Two:

    RewriteRule ^africanews/(\d+)/(\d+)$ /africanews.php?app=view&func=viewcategory&categoryid=$1&page=$2
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have two problems, the first has been solved. Current problem If I embed
I'm using devexpress and i have two problems. My insert stored procedure work fine.
I have my program that can draw rectangles. I have two problems I can't
I have two cmake-related problems: first, I can't make it to find the includes
I have some localization problems in my webpage. There are basically two problems (that
We are having some problems deploying our WCF services into IIS7. We have two
I'm having some problems trying to perform a query. I have two tables, one
I couldn't found this answer in Stackoverflow, but I have two domains and two
I have two unit test projects in my VS 2010 solution. Each project has
I have a UITableViewController which has two sections. The first section shows a single

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.