简体   繁体   中英

Laravel @ SSL after registration or login, user redirected to site/s

Very strange issue. Once I install Lets Encrypt SSL.

in config/app set URL as: https://mywebsite

in layout.blade.view set all as secure_asset (to load over httpS)

If I turn off SSL , then everything is OK

Here are my .htaccess in root :

RewriteEngine On
RewriteCond %{THE_REQUEST} ^.*/index\.php
RewriteRule ^(.*)index.php$ /$1 [R=301,L]
RewriteRule ^(.*)$ public/$1 [L]

And here is my .htaccess in public folder

RewriteEngine On
RewriteCond %{SERVER_PORT} 80 
RewriteRule ^(.*)/$ /$1 [L,R=301]
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^ index.php [L]

Problem is, when user is registered on website or logged in, then instead of redirecting to proper URL, user is redirected to mysite.com/s

If I turn OFF SSL, then everything is OK, so it means, that code is 100% working and fine.. am I right?

Thnx

Try this code:

RewriteEngine On
RewriteCond %{HTTP_HOST} ^www.abc.com [NC]
RewriteRule ^(.*)$ https://www.abcds.com/$1 [L,R=301]
RewriteCond %{HTTP_HOST} ^abc.com [NC]
RewriteRule ^(.*)$ https://www.abcds.com/$1 [L,R=301]

找到解决方案:我清除了一个缓存,这个问题消失了

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM