Non-www to www in Laravel php script Not Redirect Problem

11 views Asked by At

My website does not redirect from exsample.com to www .exsample.com.

My website is built in laravel

My htaccess file is as below.

Options -MultiViews -Indexes
RewriteEngine On

ErrorDocument 406 /


# Disable Directory listing
Options -Indexes

# Block files
<Files ~ "\.(env|config.js|md|gitignore|gitattributes|lock)$">
    Order allow,deny
    Deny from all
</Files>

# Handle Authorization Header
RewriteCond %{HTTP:Authorization} .
RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}]

# Redirect Trailing Slashes If Not A Folder...
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_URI} (.+)/$
RewriteRule ^ %1 [L,R=301]

# Send Requests To Front Controller...
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^ index.php [L]

Even if page rules are created by Cloudflare, it does not work

0

There are 0 answers