Category Archives: News

Redirecting HTTP to HTTPS Using .htaccess File

Chrome and Firefox have started showing insecure warnings to the visitors on websites without SSL certificates. Therefore, using an SSL-encrypted connection for safety, accessibility or PCI compliance reasons is necessary. For SSL-encryption, buy SSL certificates and install them to your websites.

But, installing SSL certificates will not show secure, you should also redirect all your HTTP traffic to HTTPS. In order to force your web traffic to use HTTPS, edit the codes in the .htaccess file. Before we move onto redirecting HTTP to HTTPS, here’s how you can edit .htaccess file. If you already know skip to Redirection steps.

Editing .htaccess File

There are instructions/directives in the .htaccess file that tell the server how to act in certain scenarios and directly affects how your website functions. Common directives in .htaccess file:

  • Redirects
  • Rewriting URLs

Ways to edit an .htaccess file:

  1. Edit the file on your computer and upload it to the server using FTP.
  2. Use “Edit” mode in FTP program that allows you to edit a file remotely.
  3. Use a text editor and SSH to edit the file.
  4. Use the File Manager in cPanel to edit the file.

Editing .htaccess in cPanel File Manager

Note: Backup your website in case something goes wrong.

  1. Login to cPanel
  2. Files > File Manager > Document Root for:
  3. Now select the domain name you want to access
  4. Check “Show Hidden Files (dotfiles)”
  5. Click “Go”
  6. After a new tab or window opens, look for the .htaccess file.
  7. Right click on the .htaccess file and click on “Code Edit” on the menu.
  8. A dialogue box may pop up asking about encoding. Click “Edit” button to continue.
  9. Edit the file
  10. “Save Changes” when done.
  11. Test your website to make sure it is done correctly. In case, there is an error, restore to the previous version and try again.
  12. Once you are done, click “Close” to close the window.

Redirecting HTTP to HTTPS

1. Redirect All Web Traffic

If you have existing code in your .htaccess, add the following:

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

2. Redirect Only a Specific Domain

For redirecting a specific domain to use HTTPS, add the following:

RewriteEngine On RewriteCond %{HTTP_HOST} ^yourdomain\.com [NC]RewriteCond %{SERVER_PORT} 80 RewriteRule ^(.*)$$1 [R,L]

3. Redirect Only a Specific Folder

Redirecting to HTTPS on a specific folder, add the following:

RewriteEngine On RewriteCond %{SERVER_PORT} 80 RewriteCond %{REQUEST_URI} folder RewriteRule ^(.*)$$1 [R,L]

Note: Replace “yourdomain” with your actual domain name wherever required. Also, in case of the folder, replace /folder with the actual folder name.

Think it was useful? Share this article to help them come on HTTPS

Jio GigaFiber Could Soon Reach Your Home As Reliance Industries Plans to Acquire Hathway Broadband

Reliance Industries wants to speed up the launch of Jio GigaFiber. In a bid to do that the company has initiated talks with Hathway. Hathway Cable and Datacom is India’s largest cable operator. RIL plans to buy the company so that Jio GigaFiber can reach the people sooner. They are doing everything to bring forward the commercial launch of their high-speed broadband services.

Hathway Cable and Datacom Ltd

Hathway is a cable company that operates multiple systems. In other words, it signs carriage and content agreements with broadcasters. It then provides its services to the local cable operators. The company’s average broadband business revenue (ARPU) per user in the June quarter was approximately Rs.710 per month.

Moreover, Hathway has more than 8,00,000 broadband and around 11 million digital TV users. The company’s promoter Raheja Group holds 43.48% shares of Hathway.

At the end of FY 2017-18, Hathway had a debt of around Rs.1,617 crore. The company is looking at ways to deleverage the balance sheet in the next couple of years by Rs.500 crores. Since July this year, Hathway’s promoters have planned to infuse Rs.350 crore in the company spread over the next 18 months. The capital infusion will take place in the form of long-term unsecured loans and equity.

Rajan Gupta, MD, Hathway, disclosed that the company received Rs.100 crore in July and another Rs.100 crore by August end. The balance Rs.150 crore would be received by them by March 2020. Besides this, in the next few months, the company will be earning Rs.150 crores from its operations.

RIL’s Acquisition of Hathway Broadband

Both Hathway and RIL have refused to comment on the development but insider sources confirm the news. According to them the talk between the two is still in its initial stages and all talks about the deal are still on an exploratory basis. They also revealed that even though it is not yet clear whether the negotiations will turn positive, RIL is pursuing this contract quite aggressively.

Rs.2,500 crores are the valuation figure that is being bandied around. If this agreement goes through Reliance Jio will get a jumpstart in the cable broadband business. Reliance Jio will get Hathaway’s massive digital cable TV and broadband user base where almost 90% of subscribers have over 40 Mbps of high-speed plans.

Not Reliance’s First Walk in the Park

Reliance had made an attempt to acquire another cable operator before Hathway. Last year in September RIL was in advanced talks with DEN Networks promoter Sameer Manchanda regarding a possible buy-out. When negotiations failed, Reliance Jio decided to launch Jio GigaFiber as a complete part of Reliance Jio Infocomm.

According to one of the internal sources, various business plans get discussed simultaneously at Jio. He revealed that Jio had earlier planned to purchase a big MSO and some smaller ones. They had mapped out on how the existing infrastructure of the MSO was to be used for providing broadband as well as video services.

Another source divulged that Reliance Jio faced resistance from LCOs (local cable operators). They wouldn’t let Jio proceed with its extension of the most important last-mile connectivity in crucial markets. This led to the delay in the GigaFiber roll-out. This is also why Reliance Jio is back in the market looking to acquire a cable operator.

According to a top brokerage firm’s media analyst, RIL has laid out the fiber and has an MSO license all ready. They are missing LCOs to reach the last mile. Acquisition of Hathway will solve that problem.

Best alternative to set a PostgreSQL schema using PHP PDO

To set the PostgreSQL DB connection, schema parameter is not to be included

Is this a good practice? Is there a better way to do this?

In order to specify the default schema you should set the search_path instead.

You can also set the default search_path per database user and in that case the above statement becomes redundant.