Archive for June, 2011

Enable ICMP Ping reply on Windows 2008 Server

Wednesday, June 22nd, 2011

The default setting on Windows 2008 Firewall is configured to block certain types of traffic. One of them being ICMP.

To enable ICMP

netsh firewall set icmpsetting 8

To disable ICMP

netsh firewall set icmpsetting 8 disabled

 

Static compression is being disabled warning in IIS 7 on Windows 2008

Tuesday, June 21st, 2011

In IIS 7 on Windows Server 2008, application pools can be run as the “ApplicationPoolIdentity” account instead of the NetworkService account.

To resolve this issue, we will need to assign the ApplicationPoolIdentity permission to IIS temporary Compressed Files directory.

You can add the app pool identity from the command prompt with something like icacls.

icacls e:\inetpub\wwwroot\Temp /grant “IIS APPPOOL\DefaultAppPool”:(OI)(CI)(RX)

 

PHP Redirect http to https

Friday, June 17th, 2011

if ($_SERVER[‘HTTPS’] != “on”) {
$url = “https://”. $_SERVER[‘SERVER_NAME’] . $_SERVER[‘REQUEST_URI’];??? ?header(“Location: $url”);
exit;
}

Joomla Custom Page Title

Friday, June 17th, 2011

Insert this php code in your template’s index.php file just before the closing </head> tag

hint: make sure it’s inside: <?php … ?>

$document = &JFactory::getDocument();

if (JURI::root() == JURI::current()) { // Front Page
? $document->setTitle( "Your Front Page Title" );
} else { // All other pages
? $document->setTitle( $document->getTitle() . " ? Your Site Name" );
}