Category Archives: Tips & Tricks

Add SSL and secure WordPress with HTTPS

Hello Coders…

Today lets see how to configure wordpress to have https based request.

So many have a question that first of all what is SSL and why HTTPS?

We share our personal information with different websites whether it’s making a purchase or for logging in on daily basis. In order to protect the data transfer, a secure connection needs to be created. That’s when SSL and HTTPS come in.
HTTPS or Secure HTTP is an encryption method that secures the connection between users’ browser and your server. This makes it harder for hackers to eavesdrop on the connection. Each site is issued a unique SSL certificate for identification purposes. If a server is pretending to be on HTTPS, and it’s certificate doesn’t match, then most modern browsers will warn the user from connecting to the site.

Recently, Google also announced that they will be using HTTPS and SSL as a ranking signal in their search results. This means that using HTTPS and SSL will help improve your site’s SEO.

Where to get SSL?

Many hosting service provider give SSL certificate for websites. We also provide SSL certificate as our product you can contact us we will provide SSL certificate around INR 850 (USD 12) or else you can approach other provider like godaddy. Some web hosting providers provide hosting with free SSL. we also provide web hosting with free SSL. You can have service through such providers to have SSL for your domain.

Mostly SSL configuration can be done with support of hosting service provider so we are much concentrated towards configuring wordpress for accepting HTTPS connection

How to setup wordpress to use HTTPS connection?

If you installing wordpress through softaculous then there is an option to select http / https during installation process so that it will write .htaccess file based on that.

If you installed directly through manual installation or already existing site then you can navigate to settings -> general settings under which you can see wordpress address and site address which in default have http you need to change it to https as given in below screenshot

Once it done your wordpress site will be redirect to https from http.

You can also do this by adding following code in .htaccess above wordpress .htaccess rules.

<IfModule mod_rewrite.c>
RewriteEngine On
RewriteCond %{SERVER_PORT} 80 
RewriteRule ^(.*)$$1 [R,L]

change to your domain name. This will make your wordpress site redirect to https. Even for normal site also this will make redirection to https.

Thanks for reading… Happy coding…

Drop your feedback in comments…

Wanna Cry Ransomware

A malicious ransomware has been used to deploy a massive cyber attack, infecting computers in nearly 100 countries. The ransomware called “WannaCry” locks up files on computers and encrypts them in a way that it does not allow user to access them anymore. Hackers trick victims into opening the malicious attachments that appeared to contain job offers, security warnings and other legitimate files. Below image shows spread of attack of WannaCry around globe

Image Credits:MalwareTech

Indian & Russia have been massively hit by the malware because majority of the systems run on the old windows XP OS which is no longer supported by Microsoft security support.

Microsoft taken the unprecedented step of issuing patches for unsupported operating system like windows XP in the wake of the massive WannaCry Ransomware attack against organization around the world.

Suggestion for security: Update your operating system with recent supportive version of operating system provider and also have official virus scanners in system with recent updates. Operating system providers often release security and upgradation patches which should be updated on availability to avoid this scenarios in future.


Security tip found in internet try your luck

Route CodeIgniter Controllers In Multi Level Subfolder

I was working on a project which actually requires to handle multi level subfolders for codeigniter. Usually codeigniter can handle only one subfolder. But this reduce capability of it and I am always not like to change codes in CI core. So i did some research on this found a simple solution by custom routing to extend CI core.

  1. Create a file Named “MY_Router.php” in CI application/libraries folder.
  2. Copy paste following script in it.
    defined('BASEPATH') OR exit('No direct script access allowed');
     * Author: Dineshkumar
     * Contact :
     * Add functionality to read into more than one sub-folder of controller
     * Compatible with Codeigniter 3.x
    Class MY_Router extends CI_Router
        Function MY_Router()
        function _validate_request($segments)
           if (file_exists(APPPATH.'controllers/'.$segments[0].".php"))
                return $segments;
            if (is_dir(APPPATH.'controllers/'.$segments[0]))
                $segments = array_slice($segments, 1);
                /* ----------- CHECK SUB FOLDER STARTS ------------ */
                while(count($segments) > 0 && is_dir(APPPATH.'controllers/'.$this->directory.$segments[0]))
                if (substr($this->directory, -1, 1) == '/')
                    $this->directory = $this->directory . $segments[0];
                    $this->directory = $this->directory . '/' . $segments[0];
                $segments = array_slice($segments, 1);
                if (substr($this->directory, -1, 1) != '/')
                    $this->directory = $this->directory . '/';
                /* ----------- CHECK SUB FOLDER ENDS ------------ */
                if (count($segments) > 0)
                    if ( ! file_exists(APPPATH.'controllers/'.$this->fetch_directory().'/'.$segments[0].".php"))
                    if ( ! file_exists(APPPATH.'controllers/'.$this->fetch_directory().'/' .$this->default_controller.".php"))
                        $this->directory = '';
                        return array();
                return $segments;
  3. Don’t look for more steps its over. 😛

Just your codeigniter framework capability is extended to handle

Background Image auto scaling using CSS

Hi guys today I am going to explain about a CSS property known as background-size. This helps in image auto scaling based on screen view. Usual case we use textures to fill background using repeat property. Some time we use single image as background. We can’t use very large time which will take more bandwidth and so we use optimized images. This should auto scale and fit background. To achieve this we can use background-size property of CSS. For an Example


 * Author: Dineshkumar
 * Contact :
 body {
    background-image:    url(images/background.jpg);
    background-size:     cover;                      /* <------ */
    background-repeat:   no-repeat;
    background-position: center center;              /* optional, center the image */

In above example we can give cover as value of background-size property or contain. To demonstrate how this two input value make effect in display let us consider below image as screen in which grey area are out of your visible screen.



If we use this property then image will be fit inside visual area and which may have some blank space which can be filled with background-color property as show in below image.



This makes sure that background is covered everything based on that image will be scaled. So it is like auto scale to cover your entire background. To make you understand please see below image.


Hope you understand the concept behind this property.

Happy Coding….

Delete A Repository in BitBucket

Hi as a professional developer we always keen to organize source code through git hub or bitbucket. After creating repository sometime we are in situation to delete such repositories. In bit bucket you can able to do that through following steps:

  1. Log into your Bitbucket account.
  2. Navigate to the repository you want to delete.
  3. Click the repository’s  settings icon.
  4. Choose Delete Repository from the left-hand navigation.
    The system displays the deletion dialog.
  5. (Optional) Enter a URL in the Redirect to field.
    Future users who try to access your repository are sent to this new URL.
  6. Press Delete repository.

Happy Coding…