希望你一切都好!
我有一个用laravel制作的网站,并且在页面的某些url中显示混合内容错误,这会影响我的网站功能,因为它阻止了ajax或js。在这里您可以看到有关该问题的视频:
https://drive.google.com/open?id=1A3xPUw9KMhf_rnn-xJBhw77-d5Z7t-Zw
如果有人知道我该如何解决,我的网站将托管在cloudways服务器上,感谢您的帮助。
谢谢 问候
render json: { status: status, result: user, message: msg }
我的一部分AppServiceProvider
The htaccess file is this:
<IfModule mod_rewrite.c>
Options +FollowSymlinks
RewriteEngine On
RewriteCond %{SERVER_PORT} 80
RewriteRule ^(.*)$ https://www.saludvitale.com/$1 [R,L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^css/(.*)$ /public/css/$1 [L]
RewriteRule ^js/(.*)$ /public/js/$1 [L]
RewriteRule ^img/(.*)$ /public/img/$1 [L]
RewriteRule ^video/(.*)$ /public/video/$1 [L]
RewriteRule ^images/(.*)$ /public/images/$1 [L]
RewriteRule ^users/(.*)$ /public/users/$1 [L]
RewriteRule ^banner/(.*)$ /public/banner/$1 [L]
RewriteRule ^uploads/(.*)$ /public/uploads/$1 [L]
RewriteRule ^plugins/(.*)$ /public/plugins/$1 [L]
RewriteRule ^chat-images/(.*)$ /public/chat-images/$1 [L]
RewriteRule ^fonts/(.*)$ /public/fonts/$1 [L]
RewriteRule ^favicon.ico /public/favicon.ico [L]
RewriteRule ^robots.txt /public/robots.txt [L]
# Go ahead and process files.
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^(.*)$ /public/index.php [L]
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_URI} !^/public/
RewriteRule ^(css|js|images)/(.*)$ public/$1/$2 [L,NC]
</IfModule>
答案 0 :(得分:0)
我建议您首先为所有http请求使用.htaccess设置重定向,然后将APP_URL设置为使用https https:// webname.com
检查SSL证书,然后add \URL::forceScheme('https');
到boot()方法您的AppServiceProvider.
让我知道您是否遇到任何问题