Sometimes it’s important to remove -or hide- the file extension of scripts you use. Security by obscurity might be that reason, if you don’t want others to know what script language you are using for your website, or for static site hosts. This example will hide the .php extension using IIS URL Rewrite Module, in a ready to use web.config & .htaccess example: extension less URLs in IIS.
Optimize images for the web in bulk
Optimizing and loss-less compressing images is one of those items that always pops up when analyzing your website with Google PageSpeed Insights. Images have to be loss-less compressed to save many bytes of data and thus bandwidth. This speeds up the download time of your website. But, how do we optimize images for the web? Or, what if I have hundreds of images that needs optimization? Let’s optimize and loss-less compress images in bulk, read on.
Add websites and application pools to IIS with PowerShell, in a for loop
How to use PowerShell to create websites and application pools in IIS. How to use PowerShell to create websites and application pools in IIS… A client of the company I work for wanted to quickly add 60 sub-domains to his website. But, the sub-domains had to be created as self contained IIS websites, and running in their own application pools. Luckily, the client wanted 60 consecutive sub-domain names. This made our task a bit easier, because we could easily script this in PowerShell
How to send authenticated SMTP over a TLS encrypted connection, in PHP, ASP and ASP.NET?
Send authenticated SMTP over a TLS encrypted connection, in PHP, ASP and ASP.NET. If you want to send email securely from your website, this post is for you! In this post I’ll provide some script examples for ASP, PHP, and ASP.NET (C# / VB.Net – System.Net.Mail) that you can easily integrate and use to securely send email from your website.
Connect to MS SQL Server with PHP 5.3+
As of PHP 5.3.2 you have to use the SQLSRV API functions to connect to an MS SQL Server database from PHP. For example, use sqlsrv_connect() to create a connection resource and open a connection. The main difference with the older mssql functions of PHP is that SQLSRV requires an Array() with connection information, instead of strings.