Codeigniter - pagination

Do you have a question? Post it now! No Registration Necessary.  Now with pictures!

Threaded View
Hello i dont know why the 4 segment of my url is always empty ($3
number after slash)

ja use mod_rewrite:

RewriteRule ^kategoria-([0-9]+)-(.*)/([0-9]+).html$ index.php?/cat/
lista/$1/$3 [L]


$config['uri_protocol']    = 'QUERY_STRING';
$config['index_page'] = 'index.php';
$config['url_suffix'] = '';

Ofcourse without mod_rewrite method: index.php/cat/lista/3/40 works

Re: Codeigniter - pagination

On 6/9/2011 6:22 PM, Tomasz Łopusiewicz wrote:
Quoted text here. Click to load it

And your PHP question is?

mod_rewrite is NOT a PHP module - it's an Apache module.  Try a more
appropriate newsgroup, such as alt.apache.configuration.

Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.

Re: Codeigniter - pagination

El 10/06/2011 0:22, Tomasz Łopusiewicz escribió/wrote:
Quoted text here. Click to load it

In regular expressions, the dot (.) symbol has a special meaning:

If you want to match a literal dot, you need to escape it.

Quoted text here. Click to load it

Of course, you forgot to provide an example of URL that fails to match
as expected. With my example, it works:


$url = 'kategoria-3-foo/40.html';
if( preg_match('@^kategoria-([0-9]+)-(.*)/([0-9]+).html$@', $url,
$matches) ){

... prints:

array(4) {
   string(23) "kategoria-3-foo/40.html"
   string(1) "3"
   string(3) "foo"
   string(2) "40"

-- - Álvaro G. Vicario - Burgos, Spain
-- Mi sitio sobre programación web:
-- Mi web de humor satinado:

Site Timeline