Welcome Guest, Not a member yet? Register   Sign In
Help with pagination and mod_rewrite(Solved)
#1

[eluser]fraserk[/eluser]
Hi Everyone. I'm creating my first project in codeigniter and have run into a little problem.

I think because I am using mod_rewrite to remove the index.php from my url the pagination is not working. When you click to go the the second page in the pagination link, it giving a 404 page not found error.

Pagnation Code in Controller

Code:
$config['base_url'] =  "http://www.goingclubing.com/";
            $config['total_rows'] = '20';
            $config['per_page'] = '10';
            $config['num_link'] = '2';
            $config['uri_segment'] = '3';
            
            $config['full_tag_open'] = '<div id="pag">';
            $config['full_tag_close'] = '</div>';
            $config['first_tag_open'] = '<div>';
            $config['first_tag_close'] = '</div>';
            $config['first_link'] = 'First';
            $config['last_link'] = 'Next';

Code in Model
Code:
$query = $this->db->get('events', 20, $this->uri->segment(3));
                 return $query->result();

htaccess Code

Code:
RewriteEngine on

RewriteCond $1 !^(admin/Promoters_admin\.asp|index\.asp|index\.php|resources|robots\.txt)
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ /index.php?/$1 [L]
RewriteCond %{QUERY_STRING} ^party_id=214$

RewriteRule ^party_detail\.asp$ http://www.goingclubing.com [R=301,L]


redirect 301 /index.asp http://www.goingclubing.com
redirect 301 /admin/Promoters_admin.asp http://www.goingclubing.com

Im not sure what I should I should use for the ['base_url'].

Thanks...


Messages In This Thread
Help with pagination and mod_rewrite(Solved) - by El Forum - 12-03-2009, 09:10 AM
Help with pagination and mod_rewrite(Solved) - by El Forum - 02-22-2014, 06:42 PM
Help with pagination and mod_rewrite(Solved) - by El Forum - 02-22-2014, 08:16 PM
Help with pagination and mod_rewrite(Solved) - by El Forum - 02-22-2014, 08:27 PM
Help with pagination and mod_rewrite(Solved) - by El Forum - 02-22-2014, 10:39 PM



Theme © iAndrew 2016 - Forum software by © MyBB