IIS redirect site to HTTPS

To force a site to always use HTTPS, add following content to web.config file.

Here is full web.config file for a web site that use WordPress and Force SSL

WordPress CLI

To install WordPress CLI, run following command

To list all users in wordpress, run

To create an Administrator user, run

Transmission web client

Install Transmission on CentOS

transmission is a torrent client. This come with a web GUI, that make it easy to installed on a remote server with no X-Windows. To install transmission on CentOS server, run

Allow Web Access

To access transmission web GUI, you need to white list your IP address. To do this, first stop tranmission

Edit file


Replace with

YOUR_IP_ADDR_HERE – replace with your actual IP address.

Start transmission

You will be able to access web GUI at

Downloaded files are stored in folder

Remove SSL private key password

To remove password from SSL private key, run

This will ask for password. Once you enter password, key get saved with out password.


Running Web Server with python SimpleHTTPServer

SimpleHTTPServer is a python module that allow you to run web server for static files.

To start web server, run

This will start a web server on port 8000.

You will be able to access server in URL

To stop server, press CTRL + C

To get SimpleHTTPServer run on differnt port, run

This will run SimpleHTTPServer on port 80.

Python 3

Python 3 comes with bult in module http.server, to use it, run

If you want to run on differnt port, specify port number

How to protect .git folder using htaccess

GIT is popular version control software, this work like a time machine. You can easily get older versions of code. Each changes are stored as commit, so it work like a time machine for source code.

If you put your .git folder in a publically accessable folder, others will be able to access your source code. It is better put this folder outside of DocumentRoot folder.

If your .git folder is on public folder, then use following .htaccess code to block access to it.

Method 2

Create an .htaccess file inside .git folder with content

Redirect OLD site to NEW using htaccess

To redirect old site to new url using .htacces, use following

See htaccess