Yii Framework Forum: Url Friendly - Yii Framework Forum

Jump to content

Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

Url Friendly urlManager rules, url SEO Rate Topic: -----

#1 User is offline   Pluk 

  • Junior Member
  • Pip
  • Yii
  • Group: Members
  • Posts: 34
  • Joined: 07-February 12

Posted 07 December 2012 - 09:25 AM

Hi guys, i'm lucas from spain. I try to configurate the urlmanager to a url like:

http://myweb.com/par...2/param_value_3

I've got a url working fine with one parametre passed by url,

http://myweb.com/param_value_1

with this rule:
'<user:\w+>'=>'admin/userFile',


but this other rule doesn't work:

 '<user:\w+>/<name:\w+>/<idstuff:\d+>'=>'admin/stuffFile', 


i've put this last rule over the first one, but i get none result.

Only work if i specify the controller in the url like this:

'<controller:\w+>/<user:\w+>/<name:\w+>/<idstuff:\d+>'=>'admin/stuffFile'




how can i get the first url? can i remove the controller from de url??

thanks a lot!! regards from Spain!
0

#2 User is offline   alirz23 

  • Master Member
  • PipPipPipPip
  • Yii
  • Group: Members
  • Posts: 669
  • Joined: 08-August 12
  • Location:Durban, South Africa

Posted 07 December 2012 - 03:54 PM

try this might help

'<user>/<name>/<idstuff>'=>'admin/stuffFile',
0

Share this topic:


Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users