S
S
Skrolea2016-03-31 17:00:12
Yii
Skrolea, 2016-03-31 17:00:12

Why doesn't the upload work on the server?

Installed the kop/yii2-scroll-pager plugin for endless scrolling of images. It works fine on the locale, I transfer it to the hosting - it does not work. Gives an error message

Failed to load resource: the server responded with a status of 404 (Not Found)
http://site.ru/web/index?page=2&per-page=6

The .htaccess settings are the same both there and there (I copy everything via git pull)
In root
<IfModule mod_rewrite.c>
    Options +FollowSymlinks
    RewriteEngine On
</IfModule>

<IfModule mod_rewrite.c>
    RewriteCond %{REQUEST_URI} ^/.*
    RewriteRule ^(.*)$ web/$1 [L]

    RewriteCond %{REQUEST_URI} !^/web/
    RewriteCond %{REQUEST_FILENAME} !-f [OR]
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule ^.*$ web/index.php
</IfModule>

in web folder
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . index.php

config settings
'urlManager' => [
            'class' => 'yii\web\UrlManager',         
            'showScriptName' => false,     
            'enablePrettyUrl' => true,
            'rules' => array(
                '<alias:index|about|contact>' => 'site/<alias>', 
                '<controller:\w+>/<id:\d+>' => '<controller>/view',
                '<controller:\w+>/<action:\w+>/<id:\d+>' => '<controller>/<action>',
                '<controller:\w+>/<action:\w+>' => '<controller>/<action>',
            ),
        ],

What could be? Well, that's all that's left.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
M
Maxim Timofeev, 2016-04-03
@Skrolea

Check if other ajax requests are working, check again the url to which the request goes, maybe it was left from the locale.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question