Note that there are some explanatory texts on larger screens.

plurals
  1. PORewrite url search results and pagination
    primarykey
    data
    text
    <p>Hi guys im try do make a search results url with mod rewrite</p> <p>my url is this</p> <pre><code>products/?categorie=2&amp;subcategorie=&amp;make=&amp;p=2 (P is Page) </code></pre> <p>i tried this</p> <pre><code>RewriteRule ^products([^/]*)/([^/]*)/([^/]*)/([^/]*)$ /? categorie=$1&amp;subcategorie=$2&amp;make=$3&amp;p=$4 [L] </code></pre> <p>on this the pagination dont works</p> <p>my htaccess looks this</p> <pre><code>RewriteEngine On # =========== Configuracoes Default =========== # AddDefaultCharset UTF-8 RewriteCond %{REQUEST_FILENAME} !^(.+)\.(css|js|xml|swf|pdf|doc|rtf)$ RewriteCond %{REQUEST_FILENAME} !^(.+)\.(jpg|png|gif)$ RewriteCond %{REQUEST_FILENAME} !^(.+)\.(ttf|otf|woff|eot|svg)$ RewriteCond %{REQUEST_FILENAME} !/php/acoes.php RewriteCond %{REQUEST_FILENAME} !favicon.ico RewriteCond %{REQUEST_FILENAME} !apple-touch-icon.png RewriteCond %{REQUEST_FILENAME} !robots.txt RewriteRule ^(.+)\/?([0-9]*)\/?$ php/index.php #RewriteRule ^products([^/]*)/([^/]*)/([^/]*)/([^/]*)$ /? categorie=$1&amp;subcategorie=$2&amp;make=$3&amp;p=$4 [L] </code></pre> <p>My php files are inside a folder name php</p> <p>My php file for return the search results is this</p> <pre><code>&lt;?php $Subcategorie_Id = mysql_real_escape_string($_REQUEST["subcategorie"]); $Categorie_Id = mysql_real_escape_string($_REQUEST["categorie"]); $Make_Id = mysql_real_escape_string($_REQUEST["make"]); $SqlCount = "SELECT Product_Id FROM tabproducts WHERE Product_Status =1"; if($Categorie_Id) $SqlCount .= " AND tabproducts.Categorie_Id = '$Categorie_Id' "; if($Subcategorie_Id) $SqlCount .= " AND tabproducts.Subcategorie_Id = '$Subcategorie_Id' "; if($Make_Id) $SqlCount .= " AND tabproduct.Make_Id = '$Make_Id' "; $QueryCount = mysql_query($SqlCount, $Conn) or die(mysql_error($Conn)); $RsCount = mysql_fetch_array($QueryCount); $recordCount = mysql_num_rows($QueryCount); if (!$_REQUEST["p"]) $p = 1; else $p = $_REQUEST["p"]; $pageSize = 24; $itemIni = ($pageSize*$p)-$pageSize; $totalPage = ceil($recordCount/$pageSize); ?&gt; </code></pre>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload