Search
 
SCRIPT & CODE EXAMPLE
 

PHP

force https redirection laravel

// app/Providers/AppServiceProvider.php
URL::forceScheme('https');
Comment

redrectnh to https n laravel

RewriteEngine On 
RewriteCond %{SERVER_PORT} 80 
RewriteRule ^(.*)$ https://www.yourdomain.com/$1 [R,L]
Comment

redirect from http to https laravel

RewriteEngine On

RewriteCond %{HTTPS} !on
RewriteRule ^.*$ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]
Comment

How To Force Redirect HTTP To HTTPS In Laravel Using ServiceProvider

<?php
  
namespace AppProviders;
  
use IlluminateSupportServiceProvider;
use IlluminatePaginationPaginator;
   
class AppServiceProvider extends ServiceProvider
{
    /**
     * Register any application services.
     *
     * @return void
     */
    public function register()
    {
          
    }
    /**
     * Bootstrap any application services.
     *
     * @return void
     */
    public function boot()
    {
        URL::forceScheme('https');
  
        Paginator::useBootstrap();
    }
}
Comment

PREVIOUS NEXT
Code Example
Php :: php pdo 
Php :: sort an array in php manually 
Php :: select2 on modal 
Php :: php object into nested json object 
Php :: insert into database with seeder 
Php :: acf looping through post types 
Php :: how to set optional third parameter in routes of codeigniter 
Php :: Gravity Form Shortcode Wordpress 
Php :: laravel 8 carbon if date is today 
Php :: wp plugin create 
Php :: php exit 
Php :: php generate unique id for word 
Php :: The specified module could not be found php 
Php :: download file laravel s3 
Php :: install phpmyadmin ubuntu 18.04 
Php :: join string php 
Php :: how to trim text php 
Php :: php docker offical apache 
Php :: php compare dates 
Php :: file is empty in php 
Php :: encryption and decryption in php example 
Php :: check if custom post type exists 
Php :: clear cache using laravel controller 
Php :: how to print something in php 
Php :: how do i use $variables as values in php 7 mysqli insert 
Php :: referencing constant in config laravel 
Php :: mktime() php 
Php :: how to rename a table element in laravel 
Php :: how to login first before see index php 
Php :: laravel cookie (flash meesage for time) 
ADD CONTENT
Topic
Content
Source link
Name
1+5 =