Yii: Default Home Page

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

PHP: Parsing Search Engine Friendly URL

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 …

PHP: Current URL

$_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 …