Redirect site using a .htaccess file Rumi, November 6, 2011 Instructions Create an empty text file using a text editor such as notepad, and save it as htaccess.txt. Edit the contents of the file. Check the following examples: Point an entire site to a different URL, such as domain.net redirected to domain.com: # This allows you to redirect your entire website to any other domain Redirect 301 / http://example.com/ Redirect index.html to a specific subfolder: # This allows you to redirect index.html to a specific subfolder Redirect /index.html http://example.com/newdirectory/ Redirect an old file to a new file path: # Redirect old file path to new file path Redirect /olddirectory/oldfile.html http://example.com/newdirectory/newfile.html Redirect to a specific index page: # Provide Specific Index Page (Set the default handler) DirectoryIndex index.html Related Scripts Apache
Zimbra Domain Administration (Multi-tenant) June 4, 2015 In order to create a multi tenancy in zimbra OSA, can be acheived through a bash script below. Thanks to Ahmad Imanuddin (http://www.imanudin.com) for sharing this very useful script. cd /srv/ vi admin-delegate.sh Fill with the following line : Related Read More
Linux service restart shell script November 29, 2013November 29, 2013 I badly needed a script that would check if my running services (in this script it'll check varnish and apache2 services) are alive- if not, it'll restart the dead service and write a log. Pretty handy! Related Read More
Table alternate row background color using javascript July 4, 2011January 12, 2016 The code itself speaks….!!! <html> <head> <title>Alternative table row color using javascript.</title> <script language=”javascript”> function setcolor() { var tbl = document.getElementById(“tblCountry”); tbl.style.color = “white”; tbl.rows[0].style.backgroundColor = “green”; for (var i = 1; i < tbl.rows.length; i++) { if (i % 2 == 0) tbl.rows[i].style.backgroundColor = “gray”; else tbl.rows[i].style.backgroundColor = “brown”; } } </script> </head> <body onload=”setcolor();”> <table align=”center” width=”300px” id=”tblCountry”> <tr> <th> Country </th> </tr> <tr> <td> Australia </td> </tr> <tr> <td> China </td> </tr> <tr> <td> Denmark </td> </tr> <tr> <td> India </td> </tr> <tr> <td>… Read More