Posts

Showing posts from August, 2015

Redirect non-www to www URL's using htaccess and Vice Versa

# Redirect non-www to www: RewriteCond %{HTTP_HOST} !^www\. [NC] RewriteRule ^(.*)$ http://www.%{HTTP_HOST}/$1 [R=301,L] www to non-www # Redirect www to non-www RewriteCond %{HTTP_HOST} ^www\.(.*) [NC] RewriteRule ^(.*)$ http://%1/$1 [R=301,L] Or try this link http://www.thesitewizard.com/apache/redirect-domain-www-subdomain.shtml

IP canonicalization

Image
IP canonicalization is a technique sometimes used for SEO (search engine optimization). When a site's IP address is canonicalized, the IP address redirects to the domain name.

Show google Map using Address with PHP

  <?php   $location = 'chandigarh';   $address = urlencode($location);   $request_url = "http://maps.googleapis.com/maps/api/geocode/xml?address=".$address."&sensor=true";   $xml = simplexml_load_file($request_url) or die("url not loading");   $status = $xml->status;   if ($status=="OK") {       $ravilat = $xml->result->geometry->location->lat;       $ravilon = $xml->result->geometry->location->lng;         } ?> <script src="http://maps.googleapis.com/maps/api/js"></script> <script> function initialize() { var grayStyles = [         {           featureType: "all",           stylers: [            { hue: '#aaaaaa' },       { lightness: -15 },       { saturation: 99 }           ]         },       ];   var mapProp = {     center:new google.maps.LatLng(<?php echo $ravilat; ?>,<?php echo $ravilon; ?>),     zoom:10,

Show Google Map using Address with JQuery

Address: Locate