HackRepair.com’s Bad Bots .htaccess in web.config for IIS

Learn to protect your WordPress website with this web.config file on Windows Server IIS. Block IP addresses, bad bots, query string sequences

Learn to protect your WordPress website with this web.config file on Windows Server IIS. Block IP addresses, bad bots, query string sequences

Fix for IIS URL Rewrite Module error "Rewrite Module error: Expression contains a repeat expression"
How to fix upgrades to Magento 2.0 in PHP 5.6 and higher: PHP 7+.

OpenSSL comes in handy when you need to generate random passwords, for example for system accounts and services. In this short post I'll give you a quick example on how to generate random passwords with OpenSSL in Linux (Bash), Windows and PHP.

Here is how you can verify whether an external command in PowerShell was executed successfully or not by checking its errorlevel. Simply by verifying the PowerShell exit code using the $? operator or $LASTEXITCODE.

Learn how to get the Hyper-V guest virtual machine serial number with PowerShell, this is ideal for automated deployments with WDS or docs

The Baidu spider (BaiduSpider user agent) can be a real pain to block, especially since it does not respect a robots.txt as it should. This post shows you how to block Baidu Spider bot, using IIS URL Rewrite Module based on its User-Agent string.

Set up HTTP Strict-Transport-Security (HSTS) response header in Windows Server IIS 10, here is some more technical information about HSTS in IIS, and other security headers...

Send outgoing mail over authenticated SMTP using TLS, in PHP, ASP and ASP.NET. Send email securely from your website. Ready to use examples!

Have you ever been in a situation where you needed to perform remote administration on a Windows Server, and the RDP port 3389 is blocked on a firewall? You can tunnel RDP over SSH with PuTTY

Schedule a PowerShell script to monitor local services in your Windows Server environment

To get and set File Server Resource Manager NTFS quota you now have to use PowerShell FileServerResourceManager cmdlets. It's pretty easy to get directory information with Get-FsrmQuota and change dirquota.exe using Set-FsrmQuota.

By default, an IIS application pool (or "AppPool") recycles on a regular time interval of 1740 minutes, or 29 hours. One reason for this time interval is that application pools don't recycle at the same moment every day (every day at 07.00 for example).

A change in PHP's default_charset php.ini setting causes HTML output to break if you try to set a different charset in your HTML head. It also might break functions like htmlentities() and htmlspecialchars().

Learn how to turn off swap in Bash, because when a swap partition is enabled Linux starts swapping, which may degrade (MySQL) system performance

Here is how to install software packages during a Windows Deployment Services (WDS) deployment, without Microsoft Deployment Workbench (available in the Microsoft Deployment Toolkit, or MDT).

PC retrogaming how-to for 64-bit Windows - and Linux!

Sometimes you need to find all files owned by a specific user, recursively on your Windows Server NTFS file system. PowerShell has some neat cmdlets to automate this task for you and here is how.

Over time, as your Windows Server runs longer, more and more disk space is eaten. Simply gone! Investigating the disk usage leaves you clueless; there are no large log files, crash dumps, or there is no software to be removed. Where did that space go?

Cconvert decimal to hex hexadecimal to decimal and Unix timestamps in Linux Bash. A quicky for my archives.