PHP Redirection Formula

December 12, 2012

Create a 301 redirect forcing all http requests to use either or

RewriteEngine On
RewriteCond %{HTTP_HOST} !^$ [NC]
RewriteRule ^(.*)$$1 [L,R=301]
RewriteEngine on
RewriteCond %{HTTP_HOST} ^www\.example\.com$
RewriteRule ^/?$ "http\:\/\/example\.com\/" [R=301,L]

Redirect to

RewriteEngine On
RewriteCond %{HTTP_HOST} ^$
RewriteRule ^$ [L,R=301]

Redirect visitors to a new site
Create a 301 redirect for all http requests that are going to the old domain.

  • Example 1 – Redirect from to
  • Example 2 – Redirect from to
RewriteEngine On
RewriteCond %{HTTP_HOST} !$ [NC]
RewriteRule ^(.*)$$1 [L,R=301]

This is useful when you use as your new domain name (see also this article about redirecting www and non-www domains). If not – use the code of example 2.

RewriteEngine On
RewriteBase /
RewriteCond %{HTTP_HOST} !$ [NC]
RewriteRule ^(.*)$$1 [L,R=301]

301 Redirect: to

RewriteEngine On
RewriteBase /
RewriteCond %{HTTP_HOST} !^$ [NC]
RewriteRule ^(.*)$$1 [L,R=301]

301 Redirect: to

RewriteEngine On
RewriteBase /
RewriteCond %{HTTP_HOST} !^$ [NC]
RewriteRule ^(.*)$$1 [L,R=301]

301 Redirect: Redirecting Individual pages

Redirect 301 /previous-page.html
These scripts should be placed in the .htaccess file. I chose to expose these .htaccess methods first since they are most flexible and powerful of them all. These examples alone serve as a great case for hosting on Linux web servers.

Redirect with PHP

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

  • This script should be the first piece of code on the page to function correctly.

How to do 301 redirect in PHP ?
If you want to redirect a single page to another location then put the following code in the old page which have been moved.

 header('HTTP/1.1 301 Moved Permanently');

If you want to redirect non-www to www domain name then put the following code into top of every page of the website

if (substr(getenv('HTTP_HOST'),0,3) != 'www')
  header('HTTP/1.1 301 Moved Permanently');

How to do 301 redirect in .htaccess file?
Put the following code into the .htaccess file and upload it into the root folder of the website. Note that this file only works for the website which is running under Apache Web Server.

RewriteEngine On
RewriteCond %{HTTP_HOST} ^domain\.com
RewriteRule (.*)$1 [R=301,L]

The 13 most significant smart phones ever

December 10, 2012

A brief record of the smart phone
While the industry did not really go absolutely insane until 2007, the growth and promotion of what we think of as smart phones goes returning to the beginning 90’s. Here is a look at some of the milestone gadgets that we’ve seen along the way.

1 – IBM Simon:
Repeatedly said to be the first genuine smart phone, Simon was a specialized fail that however suggested at the opportunities of the style.
ibm-simon2 – Sony Ericsson
Sony Ericsson’s inspiration system, also known as “Penelope,” may have been the first to use the name “smartphone,” in 1997.


3 – Palm Pilots
While they remaining out the “phone” aspect of the process, present-day mobile phones are immediate enfant of the PDAs, Hand Aviators, and other connected handhelds that saw use in the mid to delayed 1990’s. Shown here is the Lead 5000, from 1996.


4 – The BlackBerry
The original BlackBerry 850, released in 1999 by Canadian company Research In Motion.


5 – Treo
Sister Publication PCWorld was very stunned at 2003’s Handspring Treo, which featured most of the modern smart phone, along with a camera and a key pad.


6 – And BlackBerry again
The 7250 model, pictured here, was the first to present CDMA connectivity and Bluetooth.


7- The iPhone
In 2007, it all customized. The apple company designed on its tremendously valuable iPod device and came up with the iPhone, which was the first smart phone to get common customers as delighted about the idea as the corporate world was.


8 – Android
The HTC Desire, which many know as the T-Mobile G1, was launched more than a period after the iPhone, to far less anticipation.


9- iPhone 3GS
Integration the quicker 3G connection of the basic “iPhone 3G” model with a number of upgrades to overall presentation and life cycle of battery assisted 2009’s iPhone 3GS force customer passion to new levels.


10 – Motorola Droid
The first sign that the Android operating system foundation might be splitting into the mainstream came with the Motorola Droid in 2009.

This device combines a physical keyboard with robust hardware, an impressive screen, and free GPS navigation.


11 – iPhone 4
Apple’s redesigned iPhone 4 another time pressed the limits of the technology available in 2010.


12 – Samsung Galaxy S III
The Galaxy S III, introduced this summer, is part of a long line of apparent “iPhone killers,”


13 – iPhone 5
The sixth generation of the iPhone is each spot as impressive and exciting as we’ve come to be expecting from Apple, and early indications are that it’s already challenge some of Android’s recent market share gains.



Social Networking Like & Follow Code

December 5, 2012

Facebook :
 <div class=”fb-like” data-href=”; data-send=”true” data-width=”450″ data-show-faces=”true”></div>
<div id=”fb-root”></div>
<script>(function(d, s, id) {
var js, fjs = d.getElementsByTagName(s)[0];
if (d.getElementById(id)) return;
js = d.createElement(s); = id;
js.src = “//”;
fjs.parentNode.insertBefore(js, fjs);

}(document, ‘script’, ‘facebook-jssdk’));</script>
Source :

Linkedin :
<script src=”//” type=”text/javascript”></script>

<script type=”IN/FollowCompany” data-id=”; data-counter=”right”></script>
Source :

Google + :
<!– Place this tag where you want the +1 button to render. –>
<div class=”g-plusone” data-annotation=”inline” data-width=”300″></div>
<!– Place this tag after the last +1 button tag. –>
<script type=”text/javascript”>
function() {
var po = document.createElement(‘script’); po.type = ‘text/javascript’; po.async = true;
po.src = ‘;;
var s = document.getElementsByTagName(‘script’)[0]; s.parentNode.insertBefore(po, s);



How to create a page on wikipedia

December 5, 2012


One short description about company website around 300 words including BSE and NSE Details with company based details, and some services details which its providing.


Require at least 500 to 600 words one-company history details…

Services wikipedia

Which kind of services it’s providing please mention details….

If you have a website than you need to give information Like:

  1. Engineering  – Offering services in Hardware, Embedded, Mechanical and Software Product Engineering
  2. Architect.
  3. Outsourcing Development
  4. Enterprise Application
  5. Banking Solutions

Acquisitions and Joint Ventures:

If company has got some prizes in its business year, please mention here….

Any good outside link where company has participated any event or any company news shows on different website.

External Links:
Official Website – Link to your website homepage

Here some useful information require:
Traded as: 1 – BSE, 2 – NSE

  1. Industry
  2. Founded
  3. Founder(s)
  4. Headquarters
  5. Area served
  6. Key people
  7. Services
  8. Revenue
  9. Employees

Some of these valuable resources based on this information:

%d bloggers like this: