Answer the question
In order to leave comments, you need to log in
Why is YII2 not reading the GET parameter in an action of a certain name?
Good afternoon,
There is such a problem. Despite the fact that everything works adequately on the locale, on the hosting the address looks like:
hostname.com/driver/transports/set-image?id={id}
For the action:
...
use yii\web\Controller;
class BasicController extends Controller {
...
public function actionSetImage($id)
{
echo $id;
die();
}
...
}
Options +FollowSymLinks
IndexIgnore */*
RewriteEngine on
RewriteCond %{REQUEST_URI} !^/(web)
RewriteRule ^assets/(.*)$ /web/assets/$1 [L]
RewriteRule ^css/(.*)$ web/css/$1 [L]
RewriteRule ^js/(.*)$ web/js/$1 [L]
RewriteRule ^images/(.*)$ web/images/$1 [L]
RewriteRule (.*) web/$1
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /web/index.php
RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . index.php
'urlManager' => [
'class' => 'yii\web\UrlManager',
'showScriptName' => false,
'enablePrettyUrl' => true,
'rules' => [
'login' => 'auth/login',
'signup' => 'auth/signup',
'profile' => 'users/profile',
],
],
Answer the question
In order to leave comments, you need to log in
At you an error in TransportsController
on line 22, and you result a code BasicController
Apparently at you it is caused from TransportsController
a method and the obligatory argument is not transferred.
You have an error both on the server and on the LAN, it's just that the errors are apparently disabled on the LAN.
PS. You have a strange architecture there.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question