Questions tagged [yii-routing]

Routing in Yii Framework's MVC implementation. Yii is a free, open source PHP web application framework, and it is released under the New BSD License.

yii-routing is a tag suitable for any questions regarding routing in Yii's MVC implementation, url handling, or any other matter affecting or affected by routing in Yii.

43 questions
1
vote
2 answers

Change structure url of Yii Framework

URL standard of Yii is : http://www.example.com/index.php?r=watchCan I change this URL to `http://www.example.com/watch?v=6Pddo6kCxvM (it's same youtube url)
Huy Tran
  • 4,371
  • 10
  • 34
  • 38
0
votes
1 answer

Yii urlmanager crazy rules

goodmorning, i have yet another problem with my website. i've developed a site that is similar to yellowpages.com (well not so similar but is just to have an idea) now they asked me to make some crazy stuff with SEO and url-rewriting. i'll start…
Aliceiw
  • 420
  • 5
  • 19
0
votes
2 answers

Redirection using Routing not working in yii2

I have ProjectsController.php in which I have actionIndex In my main.php file which is in frontend/config/main.php I have done routing as below. 'components' => [ 'urlManager' => [ 'showScriptName' => false, 'enablePrettyUrl'…
rji rji
  • 697
  • 3
  • 17
  • 37
0
votes
1 answer

Yii2 advanced - enable pretty URL in module

I am learning how modules work in Yii2 and now I created the following module: gdpr. I can access the following route: /index.php?r=gdpr/user/index. However, I want to access the route like this: /gdpr/user/index. How can I achieve…
0
votes
1 answer

Yii2 rules in routing section

I am new to Yii2 and currently, I am receiving an error while setting up the application. I try to use friendly URL. According to the DOCS 'urlManager' => [ 'enablePrettyUrl' => true, 'showScriptName' => false, 'enableStrictParsing' =>…
Vlad Kn
  • 141
  • 2
  • 13
0
votes
0 answers

yii2 routing and htaccess configuration

I have the following directories in my project: Project: frontend: (which is the angularjs app) backend: (which is the yii2 advanced app) backend: controllers models views web: the root of backend…
Mohammad
  • 3,449
  • 6
  • 48
  • 75
0
votes
1 answer

Yii routing issue when use module

I want to use my url manager something link that.For my blog details http://example.com/yii-fremwork-install => it gose to blog controller details method where "yii-fremwork-install" is slug of come from database. and also wont a module for that…
Md Hasibur Rahaman
  • 1,041
  • 3
  • 11
  • 34
0
votes
3 answers

How to choose the layout of the site according to the username in yii2

I have a project where the user chooses the layout, and saves it in the database, how do I choose to change this layout in real time? For example; http://www.example.com/username/controller/action/id Throughout the site I would have with the first…
Maicon
  • 33
  • 1
  • 7
0
votes
1 answer

Manage route in yii by users

I have one task and I really don't know how to do that. So there is the table with all actions in Yii web application. All authorization's users can create their own link that indicate to particularly action, for example: There is action name's…
YuriiChmil
  • 441
  • 1
  • 5
  • 18
0
votes
2 answers

How to create URLs without parameter names in Yii?

I'm using the CGridView to display a data table: /application/protected/views/foo/bar.php $this->widget('zii.widgets.grid.CGridView', array( 'id' => 'my-grid', 'dataProvider' => $dataProvider, 'filter' => $model, 'columns' => array( …
automatix
  • 14,018
  • 26
  • 105
  • 230
0
votes
1 answer

Yii router rule to redirect a keyword to an action's $_GET Parametric

In Yii, is it possible to use the router rule to "translate" a keyword in a URL to a certain action's $_GET Parametric? What I want, is to let this URL: http://example.com/MyModule/MyController/index/foo to point…
Yang He
  • 5
  • 2
0
votes
2 answers

Yii2 url is to long so I receive a 403 code

Is there any setting for url limit in Yii 2? Some of my urls are over 300 characters and I get a 403 Forbidden…
Ionut Flavius Pogacian
  • 4,750
  • 14
  • 58
  • 100
0
votes
1 answer

Yii Framework : Is it a good idea for writng custom code for routing by logic?

I wonder if I have some logic for my url routing, Using a custom coding php will be a better idea than using the Yii urlManager inside protected/config/main.php. the "logic" mentioned above means some if{ ... }else{ ... } case, which I think keeping…
Zitty Yam
  • 135
  • 1
  • 12
0
votes
1 answer

Yii and ajax updating after submit does not render the update form page

I'm using the Yii Mvc framework and use ajax and PHP. I cannot make it work when request update after create/save comment. I need to refresh the page after create/save to make the update/save work. What am I missing? how to make the click event…
trinocle
  • 55
  • 2
  • 10
0
votes
1 answer

Yii Sending parameters to index action through page url

mysite/users triggers usersController index action. Now I want to send mysite/users/123 to usersController. How Can I do it ? and where to will go this request if not to index action ?
David
  • 4,332
  • 13
  • 54
  • 93