To parse URL from a plain string and add html hyper link to URL: From source, but removed ‘$’ from regular expression as that only matches URLs at the end of the string.
Default home page in Yii goes to ‘site/index’. What if you wants to use a different controller, module or view for home page? Config rules in urlManager
To allow authenticated user only to the whole module, instead of repeating codes to define access rules in all controller files, just add the following code to the module file in beforeControllerAction() function:
A typical URL looks like this: some_domain/index.php?section=about&content=me A search engine friendly URL looks like this: some_domain/index.php/about/me To get the ‘/about/me’ part of the URL, it’s returned by standard php variable $_SERVER[’PATH_INFO’]. To parse it into parts: explode splits the string into array delimited by “/”. Because the string starts with “/”, the first array element will not…
$_SERVER[’HTTPS’] will be non-empty value if it’s running over SSL or using HTTPS protocol. $_SERVER[’SERVER_PORT’] 80 is standard port and 443 is standard ssl port. The port number will be appended to the URL if not using these 2 standard ports.