Questions tagged [yii-url-manager]

The management of URL-addresses in web applications in the Yii framework.

The management of URL-addresses in web applications in the (Yii) framework. It involves two aspects:

  • The application needs to parse the query the user enters in the form of URL, for individual parameters;
  • The application must provide a method for forming address URL, with which it will work correctly.

In the Yii applications these problems are solved using a class CUrlManager.

The project API docs: http://www.yiiframework.com/doc/guide/1.1/en/topics.url

216 questions
2
votes
2 answers

yii2:- how can i manage angularjs post request in yii2

I am trying to send post request from angular controller to yii front end controller. Here is my controller.js 'use strict'; define(['angular', 'd3', 'd3Cloud', 'services'], function (angular, d3) { /* Controllers */ return…
Harish Mahajan
  • 3,254
  • 4
  • 27
  • 49
2
votes
2 answers

How to create pretty url in yii for module

I have searched a lot and tried a lot to do this , but no luck . I have referred this LINK. But it didn't solve my problem . I have a user module installed in yii (yii 2) . and i have user profile url like…
Manoj Dhiman
  • 5,096
  • 6
  • 29
  • 68
2
votes
1 answer

Using $_GET and URL to search

I'm trying to filter data in my view based on URL parameters. I'm currently using basic Yii Ajax search in my view, which uses $_POST to get the results to display in CGridView. search() method in my model is also a default one, using CDbCriteria…
Numline1
  • 159
  • 7
2
votes
1 answer

Yii UrlManager Action OR Controller

Is it possible in Yii UrlManager rules to set rule OR site/? For example there's "action Contacts in SiteController" and "controller MediController". Yii must use action from SiteController if it exists or user MediaController/index if not.
2
votes
1 answer

How can i get first and last record id in yii CGridview?

I want first and last record id form $dataprovider which is passed to gridview which i need to pass to this link. array( 'name' => 'msg', 'value' => 'CHtml::link(substr(strip_tags($data->msg),0,30)."…
anagha affinity
  • 273
  • 1
  • 3
  • 14
2
votes
7 answers

Remove query string to Yii URL

In Yii1.x all we had to do was add path something like' urlManager'=>array( 'urlFormat'=>'path', ............. ) But in Yii2 its gone. How do I make my URLs without query-string something…
Stefano Mtangoo
  • 6,017
  • 6
  • 47
  • 93
2
votes
4 answers

Yii 2 static pages

I can't show static pages. Try do it as described in doc here - http://stuff.cebe.cc/yii2-guide.pdf (on page 100) but when I enable prettyurl, it doesn't work. Added in urlManager rules: 'urlManager' => array( 'enablePrettyUrl' => true, …
almix
  • 289
  • 1
  • 9
  • 23
2
votes
1 answer

Can I access urlManager Rules when urlFormat is 'get' in yii?

I have a problem with my YII urlManager. urlManager Rules are not applying when urlFormat is 'get'. Here my urlManager code 'urlManager' => array( 'urlFormat' => 'get', 'showScriptName' => true, //'appendParams'=>false, 'hostInfo'=>'My…
Srinivasa Reddy
  • 114
  • 1
  • 7
2
votes
2 answers

I want to customise my yii URL

This is my URL: http://localhost/techsupportscam/index.php/question/search/2?category=XP+Support Now I want to convert into something like this: http://localhost/techsupportscam/index.php/question/search/2/XP+Support My Controller is question and…
Muhammad Shahzad
  • 9,340
  • 21
  • 86
  • 130
2
votes
2 answers

Yii url case sensitivity

In Yii I have controller named like this SomethingSomethingElseController in windows everything is fine, but when I deploy on linux server I get Unable to resolve the request "somethingsomethingelse/index" and when change url path to…
dzona
  • 3,323
  • 3
  • 31
  • 47
2
votes
1 answer

Yii internationalization - URL

When using english the following URL should apply: http://example.org/services/myservice/ When using another language, the following URL should apply: http://example.org/sirvici/misirvice/ Any easy/standard way we should handle this withing Yii ?
MEM
  • 30,529
  • 42
  • 121
  • 191
1
vote
2 answers

How to configure the Yii2 UrlManager to handle rules with and without trailing slash

I have a page like domain.com/calendar/2001/8/22, it can be visited by domain.com/calendar/2001 domain.com/calendar/2001/8 domain.com/calendar/2001/8/22 It will show different content depending on URL. I configured the urlManager…
gowhere
  • 21
  • 4
1
vote
1 answer

Yii2, optional parameter in the rounte

During the development, I have faced to the one issue with urlManager. I have SiteController with "category" action. public function actionCategory($id = null, $city = null, $location = null) { echo $id; echo $city; echo $location; } All…
1
vote
3 answers

Yii2 Trailing Slashes in URL is breaking the route

I configured UrlManager in a project and It was working the way I wanted. Now i tried to add a content whose name contains a trailing slash but i get an error 404 (Object not found). For example:…
Francis Ngueukam
  • 994
  • 1
  • 10
  • 28
1
vote
1 answer

How I add route rule from different controller or view or file by Urlmanager class in yii2

I want to add common url rules from a different files in YII2. How I array merge in return Urlmanager array. I study about this getUrlManager()->addRules but don't know I use it. 'urlManager' => [ 'class' => 'yii\web\urlManager', …
Destroyer.0211
  • 113
  • 1
  • 3
  • 13
1 2
3
14 15