Yii Framework Forum: Url Rewriting Rule Help - Yii Framework Forum

Jump to content

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

Url Rewriting Rule Help Rate Topic: -----

#1 User is offline   pix2010 

  • Newbie
  • Yii
  • Group: Members
  • Posts: 1
  • Joined: 31-October 13

Posted 15 November 2013 - 10:02 AM

Hi All

I am learning Yii and PHP, I have a question regarding
how to write a Rewrite Rule in URL management for the following requirement

My pages are like
/?r=controller/action&param1=4

I want to use the following URL format which should point to the above URL

/controller-action-param1-4.html

can someone please help?
0

#2 User is offline   ORey 

  • Elite Member
  • PipPipPipPipPip
  • Yii
  • Group: Members
  • Posts: 1,689
  • Joined: 20-April 09
  • Location:Moscow, Russia

Posted 15 November 2013 - 10:19 AM

Try this
'<c:\w+>-<a:\w+>-param1-<param1:\d+>' => '<c>/<a>'

God is real unless declared as integer
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