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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 12, 20262026-05-12T13:41:36+00:00 2026-05-12T13:41:36+00:00

I am trying to get my old paging class to work which relied on

  • 0

I am trying to get my old paging class to work which relied on the variables available with $_GET in PHP to reconstruct the URL for the paging links, it worked great but now I am changing to have “pretty url’s” with mod-rewrite.

So this

domain.com/?p=the-pagename-identifier&userid=12&page=3

would now be

domain.com/the-pagename-identifier/12/page-3

Problem is my PHP for my old paging would rely on the GET variables to re-construct the URL and make sure any variables present in the URL remain in the new URL’s it makes for new pages, now I am stuck because I need it to work with the “virtual” directories that it appears I have in the URL, domain.com/mail/inbox/page-12 is really in the root directory running through my index file domain.com/index.php?p=mail.inbox&page=12

I am lost because some pages will have more things then others in the GET part of the URL.

Since all pages are loaded through the index.php at root level I could almost just link the pages without the full URL path but instead of something like domain.com/mail/page-2 it would end up being domain.com/page-2 since the mail directory in the example is not a real directory. So is it possible to get the value in the URL of a page that was made with mod-rewrite so I can make it think it is in a subfolder and just add the page number onto the current URL of a page?

  • 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-12T13:41:37+00:00Added an answer on May 12, 2026 at 1:41 pm

    This rewrite rule:

    RewriteRule ^/([0-9a-zA-Z-]+)/([0-9]+)/page-([0-9]+)$  /index.php?p=$1&userid=$2&page=$3
    

    Would transform this:

    domain.com/the-pagename-identifier/12/page-3
    

    Into this:

    domain.com/?p=the-pagename-identifier&userid=12&page=3
    

    Completely transparent to the end user.

    So aside from generating new URL’s, your application need not change at all.

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

Sidebar

Related Questions

I'm trying to get rid of old unsafe C functions, including sscanf(). Right now
I am trying to get simplejson installed on this python 2.4.3 - I cannot
i'm having issues trying to get the result I wish. Basically what I want
I'm trying to get the title of the active window. The application is a
I may be trying to get too fancy on this one. I have a
I'm trying to move a classing ASP site to a 64-bit Windows 2008 server.
I am trying to achieve the same rotational effect like Maya in my project.
I am new to spring I am trying to create a Database Manager page
I'm having problem moving from mvc 1 to mvc 2. In my old project
G'day, I am attempting to simulate the old XBox 360 GUI with the sliding

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.