Difference between #1 and #2 of
How to make UrlManager createAbsoluteUrl work with sub-domains

Revision #2 has been created by Wade Shuler on Apr 16, 2017, 5:41:20 PM with the memo:

fix title
« previous (#1) next (#3) »

Changes

Title changed

Yii2 - How to make UrlManager createAbsoluteUrl work with sub-domains

Category unchanged

How-tos

Yii version unchanged

Tags unchanged

yii2, url manager, urlmanager, URL, subdomain, sub-domains, domain

Content unchanged

[...]
Yii::$app->urlManagerFrontend->createAbsoluteUrl(['site/login'])
~~~

In my app, it generates a link for my mainsite to the users app: `http://users.yii2-members-system.dev/site/login`. This was so on my mainsite I can link to the user's subdomain for them to login.

I hope this helps someone, and I hope Yii actually adopts a solution for this sort of linking and handling sub-domains.
1 0
3 followers
Viewed: 38 494 times
Version: 2.0
Category: How-tos
Written by: Wade Shuler
Last updated by: CeBe
Created on: Apr 16, 2017
Last updated: 6 years ago
Update Article

Revisions

View all history