Pagination not working on live server (apache)

Posted 7 months ago by MartiX

Hi guys,

I've been working on Laravel web app quite a while, now it's time to deploy the site, but a strange problem occurs.

Everythings works fine on development server, but the pagination seems broken on live server. This is the route:

Route::get('/articles/{category}', '[email protected]');

Now the pagination add to URL this "?page=2", which is okay and works fine on the dev server, problem is, that when I click on the page 2 or whatnot, I'm redirected back on the same page with the same list of articles. URL changes but nothing besides redirect to the same list happens.

I think this may be the problem with my .htaccess, well this is not quite my area so I just asume. Does anyone know, what might be the problem?

This is my .htaccess:

<IfModule mod_rewrite.c>    
    <IfModule mod_negotiation.c>
    Options -MultiViews -Indexes

    RewriteEngine on

    RewriteCond %{HTTP_HOST} ^$ [NC]
    RewriteCond ^(.*)$ [R=301,L]

    ErrorDocument 404

    RewriteCond %{HTTP:Authorization} .
    RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}]

    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteCond %{REQUEST_URI} (.+)/$

    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteRule ^(.*)$ index.php?/ [L]

Please sign in or create an account to participate in this conversation.

Reply to

Use Markdown with GitHub-flavored code blocks.