Author Archives: Sanju

About Sanju

I’m Sanjunath.S from Mumbai, India. I like web technologies, traveling & history. I have 11+ years of experience in web technologies like HTML 5, CSS 3, JavaScript, Bootstrap, and PHP.

30 Apr

How to redirect url with or without www in htaccess

redirect url with or without www in htaccess

Normally every website domain is accessible with or without www ( or We will get the same pages & there will be no difference. But Google will consider it as duplicated content and it will affect your Search Engine Optimization ranking. So we should define a preferred domain method with the help of htaccess. It will redirect the access to either with or without www. Alternatively, add canonical URL ( <link rel=”canonical” href=”” /> ) in your page head and don’t forget to choose a preferred domain in Google Webmaster Tools.

Here i’m going to show you how to define a preferred domain method in htaccess.

Redirect to

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

Redirect to

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

Redirect IP to

RewriteEngine on
RewriteCond %{HTTP_HOST} ^12\.34\.56\.789$
RewriteRule ^(.*)$$1 [L,R=301]


17 Feb

Freedom 251 – World’s Cheapest Smartphone from India


Indian company Ringing bells has launched digital India’s most ambitious project, freedom 251 as a part of Make in India. This phone is India’s cheapest smartphone (251 INR or $4), might be the cheapest smartphone in the world.

‘Freedom 251’ launch is in line with Indian Prime Minister Narendra Modi’s vision for “empowering India to the last person, transforming India’s growth story”.

cheapest smartphone in the world

How To Buy or Book Freedom 251 Smartphone at 251 INR or $4 :-

Company started a dedicated website for Freedom 251. Bookings started from February 18, 6:00am onwards, and the window will remain open up to February 21, 8:00pm. The company has also said that it will complete all deliveries before June 30. Click here for Freedom 251 Smartphone Booking page – Buy at your own risk.


Freedom 251 Smartphone Specifications :-

  • Price is the main thing, 251 INR (4 USD)
  • 4″ WVGA IPS Display
  • 1.3Ghz Quadcore Processor
  • 1GB / 8GB memory
  • 3.2 / 0.3 Camera
  • 1450 mAh Battery
  • Dual Sim
  • 3G
  • Android 5.1 Lollipop
  • 1 year warranty
  • 650+ Service centres

How is the Freedom 251 is so cheap?

We will not get a branded smartphone battery in this price. We don’t know, how they are selling for 251 INR. Might be the central government is giving some subsidy as a project of Make in India. If you have any query, you can contact them from this link

26 Jan

Why Google Loves SSL Certified Websites – HTTPS Everywhere

SSL secure website

Security is a top priority for Google. That’s why Google Loves SSL Certified Websites or HTTPS. So it’s very helpful to get high rank in SEO (Search Engine Optimization). Now the impact is fewer than 1% of global queries, but it will change in future. It’s called HTTPS Everywhere: Every websites will be switch to HTTPS to keep everyone safe on the web. Check out this post Top 4 Basic Search Engine Optimization Tips for some basic tips of SEO.

For websites that deal with personal data, or transactions via the Internet, it is necessary to take measures for security of the web application. Processing transactions should be handled securely on the web. Meaning that we need to be able to transmit information between the web site and the web browser in a way that makes it difficult for other the server to intercept and read. To deal with such situations where we need security, we need a SSL or Secure Sockets Layer to take care of this.

What is SSL (Secure Sockets Layer) ? SSL is a a protocol much like the standard HTTP, but is a secure protocol that can receive and transfer data over the Internet. An encrypted SSL connection requires that the encrypted data to be passed to and from the web server and the web browser and to be decrypted at the receiving end. A SSL certificate is used to authenticate a web site.

What are SSL certificates ? The certificate contains the server’s public key, which is used by the browser to identify and authenticate the server and encrypt the information from the server using SSL. SSL certificates are much like any identification proof that once authenticated, permits the flow of encrypted information through the HTTPS.

fb ssl

There are three different types of SSL certificates you could use. Generally your web hosting companies may provide SSL certification for your website. Some may provide it as a free service, although it may not be any more secure than the standard HTTP.

Shared SSL : As the name suggests, multiple domain names share the same IP address making it easier for the host to managed single shared SSL over different servers. This is a comparatively cheaper method, as single SSL needed to encrypt an array of web sites.

Dedicated SSL : Dedicated SSL, much like dedicated hosting has SSL certification specifically for your root domain space. An HTTPS connection is verfied through a designated IP address. It is the most secure method but comes at a price.

Wildcard SSL : Wildcard SSL certifications will have multiple sub-domains for your website.

02 Dec

5 Must Have Free WordPress Plugins for Every Blogger

Must Have Free WordPress Plugins

WordPress is the most popular open source platform of running blog & website. Here, it’s a list of 5 Must Have Free WordPress Plugins for Every Blogger that based on my personal experiences. Each one of these essential WordPress plugins that should be installed on every new WordPress site before you do anything else.


WordPress SEO By Yoast

WordPress SEO By Yoast
WordPress out of the box is already technically quite a good platform for SEO. But that doesn’t mean you can’t improve it further! You can improve your WordPress SEO: Write better content and have a fully optimized WordPress site using Yoast SEO plugin.


W3 Total Cache

W3 Total Cache
W3 Total Cache improves the user experience of your site by increasing server performance, reducing the download times and providing transparent content delivery network (CDN) integration. The only WordPress Performance Optimization (WPO) framework; designed to improve user experience and page speed.


Disqus Comment System

Disqus Comment System
The Disqus comment system replaces your WordPress comment system with your comments hosted and powered by Disqus.



Simple to use automated backups of your WordPress-powered website. BackUpWordPress will back up your entire site including your database and all your files on a schedule that suits you.


Contact Form 7

Contact Form 7
Contact Form 7 can manage multiple contact forms, plus you can customize the form and the mail contents flexibly with simple markup. The form supports Ajax-powered submitting, CAPTCHA, Akismet spam filtering and so on.


24 Sep

Top 4 Basic Search Engine Optimization Tips

Basic Search Engine Optimization tips

We all know that ranking highly on the search engines to get targeted traffic. It’s very important for every website, if we are selling products or services online. In order to get high ranking on search engines, you need to understand how to optimize your website or blog. So that the search engines can easily find your web pages or blog posts. Here are some Basic Search Engine Optimization tips, which you can use to optimize your website or blog.


1. Targeting the right keywords

SEO keywords

Keywords are the fuel for targeted traffic and they form the basis of highly optimized web pages. As you know, users are using keywords to find what they are looking for online. So basically you need to be thinking like a real user who is searching for information on the web. There are many great keyword research tool that you can use to uncover all these important keywords. Google Keyword Planner is a great research tool, it will help you to find the right keywords.


2. Content is King in SEO ( Search Engine Optimization )

Content is King in SEO

If you are selling your products or services online, you need to create unique and interesting content that is related to your products or services. The search engines love unique and fresh content so if you can provide them with good and fresh content, they will give your website a high ranking. Try your best to create interesting information or content that people want to read and willing to give you their opinions by commenting on your blog. The more people comment on your blog the better because this can give your blog a lot of fresh and unique information.


3. On-site optimization

Website On-site Code Optimization

Meta Title & Meta Description – These things must be unique throughout your website, don’t repeat on multiple pages and keep it as, most relevant to the page content & keywords. As well as this, page titles should be in sentence form and not just a list of keywords as this could be seen as irrelevant keyword stuffing, which may negatively impact on your wider optimization efforts. Many people get this wrong and fail to realize just how important a page’s title can be in increasing the relevancy of your website to the keywords you wish it to appear for.


4. Build quality back-links

Social Media Optimization

A back-link is basically a link from other website/blog to your website. It is like a vote. The more votes or links you get from other website to your website, the better. The search engines especially Google will give website that has many quality back-links a high authority. Google trusts websites that have high authority and hence will rank them highly on their search results or front page.

There are many ways to get good quality back-links & website traffic. E.g: You can submit your unique content to high-traffic website or blog like, and Social media websites (, and ) also will provide you good quality back-links and a lot of targeted traffic.

Make sure your website don’t have any code error, broken links & spelling mistakes. Validate your website using W3C Markup Validation Service Keep your website alive & active on social media. These are the Basic Search Engine Optimization tips for website to get high ranking and good traffic. Google Search Engine Optimization Starter Guide is providing lot of Basic Search Engine Optimization tips. Google Webmaster Tools and Google Analytics helps you to understand your visitors and improve your website’s Search Engine Optimization.


28 Jun

Elephanta Caves – The ancient cave city of lord Shiva

shiva thrimurthi elephanta cave

Three-headed (Trimurti) sculpture of the Lord Mahadeva

Elephanta (Gharapuri – the city of caves) is one of an island in Arabian sea, about 10 kilometres to the east of the Metropolis city of Mumbai (the commercial capital of India). The ancient cave city of lord Shiva is a UNESCO World Heritage Site since 1987 and maintained by the Archaeological Survey of India. All caves are carved from single stone – in between 5th A.D and 8th A.D. Gharapuri was the old name of the island. There was a single stone elephant sculpture in the entrance of the island, when Portuguese navigators came to this island, hence the new name Elephanta was derived. Presently, the elephant statue is housed at Jijamata Garden in Mumbai.

Elephant statue of Elephanta island at Jijamata Garden

Elephant statue of Elephanta island at Jijamata Garden


Ancient history of Elephanta caves is a mystery. The Elephanta caves are “of unknown date and attribution”. The date of the caves is different according to different Archaeology specialists. There were some inscriptions about the ancient cave city of lord Shiva, which is missing since Portuguese ruling.  Different dynasties ruled this island, the Konkan Mauryas, Chalukyas of Badami, Rashtrakutas, Kalyani Chalukyas, Yadavas of Deogiri, Gujarat Sultanate, Portuguese, Marathas and Britain. Once it was the capital city of Konkan Mauryas and there was a major port from 2nd B.C. The Kailashnath temple at Ellora and Badami caves has many similarities to Elephanta caves. The Kailashnath temple at Ellora was built by Rashtrakutas and Badami caves built by Chalukyas of Badami. Rashtrakutas were strongly influenced by Lord Shiva,hence contributed for these caves.

Elephanta cave 1 in 1972 and 2015

There are two groups of caves in Elephanta Island. All caves were painted (fresco painting) in the past, now only traces are visible.1st group contains five caves and 2nd group contains two caves. All caves are carved from solid basalt rock, like caves at Ellora and Ajantha. Brahmanical worship had happened, until Portuguese rule began in 1534. They used this island as a watchtower and installed cannons, targeted to see from the top of a hill. There are two British-era cannons at the top. Portuguese army did shooting practice hence there is maximum damage to all sculptures in the caves except Trimurti sculpture in cave 1. Hinduism was declining on Elephanta Island under Portuguese rule. All caves were abandoned and were under vegetation from 16th AD to 20th AD. The annual festival of Shiva – Maha Shivaratri only survived to this day.

Charles II of England married daughter of King John IV of Portugal. Portuguese left the island  in 1661, since Mumbai which included elephanta island was a part of the dowry.

Nataraja Cosmic dancer

Nataraja – The Cosmic Dancer

1st cave (Great Cave) is a brilliant example of glorious ancient Hindu civilization. World famous for its carving techniques. There are many forms of Lord Shiva in 1st cave. On the south wall of 1st cave, there is an unforgettable three-headed (Trimurti) sculpture of the Lord Mahadeva, representing three essential functions: Aghora (the destroyer – most powerful in the universe) on left side, Vamadeva (master of joy and beauty) on right side and Tatpurusha (preserver of positive and negative principles of existence) in the center. Famous sculptures of Elephanta caves are Trimurti, Ravana shaking the Kailash (same sculpture like cave 16, Kailashnath Temple, Ellora), Shiva-Parvati on Kailash, Ardhanarishvara (half men and half woman), Kalyanasundara (Wedding of Shiva), Shiva Linga, Nataraja (The Cosmic Dancer), Yogishvara (Master of Yoga)and Kartikeya and Ganesha.

Ardhanarishvara (half men and half woman)

Ardhanarishvara (half man and half woman)

Cave 2, 3, 4 and 5 are broken, small and unfinished. Cave 6 and 7 are located in the eastern side of the island. These Buddhist caves are hidden from visitors. Cave 6 and 7 need more excavation. Cave 6 was converted into a church by Portuguese during their ruling of Elephanta Island.

Elephanta cave 5

Ruins of Elephanta cave 5

Presently, ASI and UNESCO are doing maintenance of the caves properly. The Underwater Archaeology Wing of the Archaeological Survey of India (ASI) has discovered remains of bricks from which houses were built, stonewalls, Roman Amphoras (pots used to transport a variety of things like olive, dry fruits and spices), coins and broken parts of vessels from shores of elephanta island. Even the sand on the shore, at the north and the east of the Mora bundar, is full of small potsherds. The Roman artefacts date backs to the 4th to 6th centuries. This discovery shows that Elephanta Island was a major port and was trading with the late Roman Empire. Locals believe there was an underground tunnel from Belapur fort to Elephanta Island.

Interior of Elephanta cave 1 in 1880 and 2015

There are 1000+ populations living in 3 villages in Elephanta Island, namely Shent bundar, Mora bundar and Raj bundar. Local’s earning mainly depends on cave’s tourism.

How to Reach:

The island is easily accessible by ferry from Mumbai City. Typically every 20 minutes a boat leaves from Gateway of India to Elephanta Island. Ferry Cost is Rs.130/person (Return ticket). It will take 1 hour for one side traveling. 30 min walkable distance from Elephanta Island boat jetty to the caves.

Ferry timings:
Gateway to Elephanta: 9 am – 2 pm
Elephanta to Gateway: 12 noon – 5:30 pm

Elephanta island view from boat

Elephanta island – a view from boat

Quick Facts:

Country: India
State: Maharashtra
District: Raigad
Coordinates: 18.96 N 72.93 E
Local languages: Hindi and Marathi
Best Time to Visit: September to March
Closed on:  Monday
Nearest Airport: Mumbai Airport


17 Jun

Canonical url trailing slash missing for homepage – WordPress & Yoast

wordpress canonical trailing slash

When you install WordPress in a sub directory Example: ‘blog’, the canonical link should be: But Canonical url trailing slash will be missing for homepage. Yoast will show the home page canonical tag, without having a trailing slash like this :

All pages will show the canonical URLs as having a trailing slash except the home page. Yoast WordPress SEO plugin gives canonical url and sitemap url as which is incorrect. So the problem is, Google will index home page ( without a trailing slash. The SEO plugin should put the trailing slash in the canonical url and in the sitemap when the site is in a subdirectory.


There is no need for editing .htaccess file. You can fix this issiue from WordPress admin panel.
Wordpress admin panel -> Plugins -> Editor. Select WordPress SEO from the right top of the page. Find and select the file “wordpress-seo/frontend/class-frontend.php” from the right side of files list.

In that file, find this code: ” $canonical = home_url();
Update that code like this : ” $canonical = home_url(‘/’);

Done !!

Canonical url trailing slash will be showing for home page (

05 Jun

Nikita Buyanov’s cute laptops for crazy girls

make up laptop for crazy girls

Nikita Buyanov is an industrial designer, project leader of Contract Wars, working title Russia 2028 and numerous other interactive/ad/game projects. Now he uncovered few outstanding laptop concepts.

This Russian was commissioned to design a series of conceptual, female-oriented laptops for HP/Intel. Nikita Buyanov’s ideas will rock our world. These are some examples of cute laptops for crazy girls.


make up laptop for crazy girls


perfume laptop for crazy girls


hp nobag laptop for crazy girls


hp mama laptop for crazy girls


 hp chameleon laptop for crazy girls


hp fitness laptop for crazy girls

29 May

Google reCaptcha javascript validation

google recaptcha validation

This is a simple solution for Google recaptcha client side javascript validation.

This way you can handle the validation of the response in your form submit handler using javascript. This seems more simple solution than trying to handle it on the captcha callback.

<script type="text/javascript" language="javascript">
function validateform(){
var captcha_response = grecaptcha.getResponse();
if(captcha_response.length == 0)
    // Captcha is not Passed
    return false;
    // Captcha is Passed
    return true;
// ]]></script>
<script type="text/javascript" src=""></script></pre>
<form action="" method="post" onsubmit="return validateform();">
<div class="g-recaptcha" data-sitekey="your_sitekey"></div>
 <input type="submit" value="Submit" /></form>

“grecaptcha.getResponse()” will return a null value, if recaptcha validation is not passed on client side. Else it will return a value. So we need to check the length of the response (null or not), for recaptcha is valid or not valid.

19 Dec

Remove hash from AngularJs url

Remove hash from AngularJs url

Rewrite your AngularJs app url from to

There are few things to set up for remove hash from AngularJs url. So your link in the browser will look like and these are your base href + angularjs config + .htaccess url rewrite.

1) Base href

Set the base href in HTML file.

    <base href="/">

2) Angularjs

Add html5Mode inside your angularjs config file.

app.config(function ($routeProvider,$locationProvider) {
  .when('/', {
	templateUrl: 'home-page.html',
	controller : 'appController'

3) .htaccess url rewrite

Put this inside your .htaccess file.

RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ /#/$1 [L]