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!!!
Use
$_SERVER["SCRIPT_URI"]instead of$_SERVER["REQUEST_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
mpageparameter as well: