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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 1, 20262026-06-01T16:58:48+00:00 2026-06-01T16:58:48+00:00

I initialize $page the following way: $mpage = trim( ( isset( $_GET[ ‘mpage’ ]

  • 0

I initialize $page the following way:
$mpage = trim( ( isset( $_GET[ 'mpage' ] ) ? $_GET[ 'mpage' ] : '1' ), '/' );

For page materials the $_SERVER['REQUEST_URI']) is http://localhost/en/materials I would like to implement paging of the materials available, e.g. localhost/en/materials?mpage=3 or localhost/en/materials?mpage=2.

Is this something to do with htcaccess? Please help me out. Thanks!!!

  • 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-01T16:58:49+00:00Added an answer on June 1, 2026 at 4:58 pm

    Use $_SERVER["SCRIPT_URI"] instead of $_SERVER["REQUEST_URI"]:

    ...
    $mpage = $_GET['mpage'];
    ...
    $currpage = $_SERVER["SCRIPT_URI"];
    ...
    

    EDIT & EDIT 2: fixed $mpage variable name

    UPDATE

    The problem is in the rewrite, you need to add the QSA flag to all redirects to “keep” the mpage parameter as well:

    RewriteEngine On
    RewriteCond %{REQUEST_FILENAME} -f                [OR]
    RewriteCond %{REQUEST_FILENAME} -d
    RewriteRule .  -                                  [L]
    
    RewriteRule ^$ index.php                          [QSA,L]
    RewriteRule ^admin/?$ admin/index.php             [QSA,L]
    RewriteRule ^admin/(.*)$ admin/index.php?page=$1  [QSA,L]
    RewriteRule ^(.*)/(.*)$ index.php?lang=$1&page=$2 [QSA,L]
    RewriteRule ^(.*)$ index.php?lang=en&page=$1      [QSA,L]
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have the following line in my document.ready() section, i.e. $(document).ready(function() { // initialize
I'm developing a Firefox extension and have the following code: function initialize() { //
I have the following tabs on certain div on my page: (this code is
My theme's custom options panel has the following code... ` /* initialize the site
I have the following pretty standard process: I initialise my page in $(document).ready .
I've been following the tutorial on the Devise github page here: https://github.com/plataformatec/devise/wiki/How-To:-Allow-users-to-sign_in-using-their-username-or-email-address I'm in
In C#, I can initialize a list using the following syntax. List<int> intList= new
I have the following set of Views and Router, when the page is first
I have the following Javascript that includes both the standard Google Maps API initialize()
If I redirect to a new page passing TempData to initialise the page it

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.