Parameterized host names

I know that post on this topic have already been posted and answered in this forum, but they were not sufficient for me to understand how to make look like

I just can’t figure out how parameterized host names work.

As I understand, this rule


'http://<user:\w+><lang:\w+>/profile' => 'user/profile',


is used with subdomain: and parses <user> into GET parameters.

But in my situation I want to imitate a subdomain.

My rule is:


and the browser says it can’t find url

‘showcase/view/user_id’ points to “Showcase module View controller User_id action” which probably doesn’t exist. Try ‘showcase/view’ instead.

Btw, why do you need both username and user_id in the same rule? Username would be enough to identify user uniquely.

Szia! :slight_smile:

There are many of us working on this project… user_id is also represented in rules as id …

it look like the browser tries to find a real url which does not exist.

If you want the www part, then you have to define it. In fact www is a subdomain, so you would have 2 subdomains with this rule:


no, I do not need www

now the browser reports that it can’t find and drops profile/65/showcase

I can’t understand what’s wrong?

I’m I moving in the wrong direction?

I’ve googled that some use a DNS wildcard (* enable subdomain usage. Is it necessary to achieve my goal?

Yes it’s necessary. Otherwise you would have to set a DNS entry for each username.