Archive for the ‘Internet’ Category

301 redirect

Posted: October 29, 2010 in Internet, Networking, Server
Tags: ,


In some situations, we have to make some manual configurations in IIS in order to implement a customers 301 redirect requests. Here are some types of requests that require manual configurations:

* The customer wants to setup a 301 redirect for a domain alias
* The customer wants to setup a 301 redirect for to point to

In order to setup the redirect, please follow these steps:

1. Open the IIS MMC
2. Browse to the existing site in IIS.
3. Right click on the site. Select Properties.
4. Click Advanced. Remove any host headers from the URL that we will be configuring 301 redirects on.
5. Right click on Web Sites. Select New Web Site.
* The description should be 301_URL_being_redirected_primary_domain (ex
* The IP address should match the IP address of the host header(s) you removed above.
* The host header should match the host header you removed above.
* Enter the path as c:\inetpub\wwwroot
6. Now, right click on the newly created site, select properties.
7. Under the home directory tab, select “A redirection to a URL”. Redirect to the URL specified by the customer. Check “A permanent redirection for this resource”
* Make sure the checkbox “The exact URL entered above” is _NOT_ checked.
8. Under the Web Site tab, click advanced. Setup any additional host headers required.
9. If the main web site has a dedicated IP address: You will also need to setup host headers for the dedicated IP address on the 301 site you created above.

For a working example of this, please check WEHOST8 sites and For this particular example, the customer wanted requests to and to be redirected to, and the domain also had a dedicated IP address.

Displaying Flickr images on forum

Posted: October 26, 2010 in Internet
Tags: ,

If you want to display your Flickr images on forum, here is the step.

1. Upload the image on Flickr and click that pic. Grab the link:-

2. We don’t need all of the link to display it on forums, select only the required part and add [IMG] and [\IMG] in the link:

Paste that link in the forum with the img tag so that your image will be displayed

Phishing email

Posted: October 10, 2010 in Internet

No this is not a tutorial about to prevent Phishing scams /attacks.

This is a sample Phishing email that you may receive from miscreants.
Dear HSBC Customer

During our regularly scheduled account maintenance and verification procedure we have detected a slight error in your billing information.

This might be due to the following reasons:

1. A recent change in your Personal Information (ie.change of Address, email address)
2. an inhability to accurately verify your selected option of payment due to an interal error within our systems.

Please verify your information. Tod do this have attached form to this email, Please download the form and follow the instruction on your sreen. NOTE: The form needs to be opened in a modern browser which has javascript enabled (ex: internet Explorer 7, Firefox 3, Safari 3, Opera 9)

We are requesting this information to verify and protect your identity. This is in order to prevent the illegal activity of your HSBC account.

Please do not reply to this email. This mailbox is not monitored and you will not receive a response.

We apologize for any inconvenience this may have caused

HSBC Group Online Banking Service

Issued for UK use only | c HSBC Bank plc 2002 – 2010

Mime type

Posted: July 19, 2010 in Internet, Networking, Server
Tags: ,

Mime type needs to be added in the control panel [Plesk, hsphere, Helm…] if you want your domain to support a new file extension. For example, if you want to support .swf or .mp4 you may need to add the MIME extension.

Look at the below URL for the list of Mime types

301 Redirect

301 redirect is the most efficient and Search Engine Friendly method for webpage redirection. It’s not that hard to implement and it should preserve your search engine rankings for that particular page. If you have to change file names or move pages around, it’s the safest option. The code “301” is interpreted as “moved permanently”.

You can Test your redirection with Search Engine Friendly Redirect Checker

Below are a Couple of methods to implement URL Redirection

IIS Redirect

1. Server -> run -> Inetmgr [iis]

2. Right click a domain that you want to redirect -> properties


Choose home directory

4. Select redirection to the URL and enter the URL in the text box

5. Apply and press ok. Thats all. iisreset to reflect the changes if its not working.

ColdFusion Redirect

<.cfheader statuscode=”301″ statustext=”Moved permanently”>
<.cfheader name=”Location” value=””&gt;

PHP Redirect

Header( “HTTP/1.1 301 Moved Permanently” );
Header( “Location:; );

ASP Redirect

<%@ Language=VBScript %>
Response.Status=”301 Moved Permanently”
Response.AddHeader “Location”,”;

ASP .NET Redirect

<script runat=”server”>
private void Page_Load(object sender, System.EventArgs e)
Response.Status = “301 Moved Permanently”;

JSP (Java) Redirect

response.setHeader( “Location”, “; );
response.setHeader( “Connection”, “close” );

CGI PERL Redirect

$q = new CGI;
print $q->redirect(“;);

Ruby on Rails Redirect

def old_action
headers[“Status”] = “301 Moved Permanently”
redirect_to “;

Redirect Old domain to New domain (htaccess redirect)

Create a .htaccess file with the below code, it will ensure that all your directories and pages of your old domain will get correctly redirected to your new domain.
The .htaccess file needs to be placed in the root directory of your old website (i.e the same directory where your index file is placed)

Options +FollowSymLinks
RewriteEngine on
RewriteRule (.*)$1 [R=301,L]

Please REPLACE in the above code with your actual domain name.

In addition to the redirect I would suggest that you contact every backlinking site to modify their backlink to point to your new website.

Note* This .htaccess method of redirection works ONLY on Linux servers having the Apache Mod-Rewrite moduled enabled.

Redirect to www (htaccess redirect)

Create a .htaccess file with the below code, it will ensure that all requests coming in to will get redirected to
The .htaccess file needs to be placed in the root directory of your old website (i.e the same directory where your index file is placed)

Options +FollowSymlinks
RewriteEngine on
rewritecond %{http_host} ^ [nc]
rewriterule ^(.*)$$1 [r=301,nc]

Please REPLACE and with your actual domain name.

Note* This .htaccess method of redirection works ONLY on Linux servers having the Apache Mod-Rewrite moduled enabled.

How to Redirect HTML

Please refer to section titled ‘How to Redirect with htaccess’, if your site is hosted on a Linux Server and ‘IIS Redirect’, if your site is hosted on a Windows Server.

Type the following code and save it as index.php


   header( 'Location:' ) ;


In the location section, add the domain that you want to redirect it. For example, if you have and want it to redirect it to, type in the location section.

more info from here:-

MICROSOFT GUIDE – translate-htaccess-content-to-iis-webconfig

The below content was actually posted by my colleague Mr. Senthil  in the cnet forum. I thought it will be good to post it on here.

Firefox pages runs faster by allowing multiple connections so it can download more than one file at a time. It’s only useful for broadband users, so if you’re still on dial-up you can just skip this one for now.

Here’s something for broadband people that will really speed Firefox up:

1.Type “about:config” into the address bar and hit return. Scroll down and look for the following entries:

network.http.pipelining network.http.proxy.pipelining network.http.pipelining.maxrequests

Normally the browser will make one request to a web page at a time. When you enable pipelining it will make several at once, which really speeds up page loading.

2. Alter the entries as follows:

Set “network.http.pipelining” to “true”

Set “network.http.proxy.pipelining” to “true”

Set “network.http.pipelining.maxrequests” to some number like 30. This means it will make 30 requests at once.

3. Lastly right-click anywhere and select New-> Integer. Name it “nglayout.initialpaint.delay” and set its value to “0″. This value is the amount of time the browser waits before it acts on information it receives.