Quantcast
Channel: Yii Framework Forum
Viewing all articles
Browse latest Browse all 18717

Custom Url

$
0
0
I'm a newbie in Yii, I'm learning it.
Today I'm learning URL management.

I am using path URL structure and it works correctly.

But I want more.

For example:

I have this: //localhost/MyYiiApp/content/display?alias=something

where content is my controller's name, display is my action's name, and alias is a parameter in the URL.

I would like to see only the parameter in my URL with this controller/action pair, so I would like to hide my controller/action name from URL, so I would like to convert into this:

//localhost/MyYiiApp/something

What rule should I write into the rules array of URL manager in the config/main.php file?

ps.: Sorry for my English :)

Viewing all articles
Browse latest Browse all 18717

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>