Posts

Showing posts from October, 2019

How to Show Cookie Policy Consent or GDPR Popup in Laravel using Cookie.

Cookie in Laravel You can use the cookie in Laravel using the Helper method ` cookie() ` or method available with Request/Response Object or `Cookie` facade. $request->cookie('name'); OR use Illuminate\Support\Facades\Cookie; Cookie::get('name'); To get more clarity on how to use the cookie in Laravel with an example to show cookie consent popup on your Laravel website and hide/remove it once you accept the policy. Cookie Policy Consent Popup in Laravel First, create and a Cookie Consent popup as notification to the footer section of your Laravel main blade template file.  <div class="cookies-block">         <h5>This website uses cookies</h5>         <p>We use cookies to improve your experience and deliver personalised content. By using this website, you agree to our <a href="javascript:void()">Cookie Policy</a>.</p>         ...

How to Write Redirect Rules for HTTP to HTTPS in Apache using .htacess

HTTP vs HTTPS HTTP (HyperText Transfer Protocol) is the most basic and known protocol (a standard set of rules) used to transfer data from a web server to a browser. It allows communication between different systems. HTTPS is HTTP with encryption i.e it uses encryption (TLS/SSL) to make HTTP requests more secure while transferring the data from a web server to a browser or vice-versa.  So there are benefits of using HTTPS for your website: 1. It makes your website more secure against data theft. 2. It also improves your SEO rank. So now let's learn how we can direct a website from HTTP to HTTPS. First, make sure you have generated and integrated SSL certificate for your website and the Rewrite module is enabled on your hosting server. so that your website can work on HTTPS without any trouble. After applying the SSL certificate our website can be accessed via HTTP or HTTPS. But per above after knowing the benefits of HTTPS we need redirect HTTP to HTTPS. ...