简体   繁体   中英

Wordpress: Redirect URL Issues

I understand that wordpress automatically redirects your url from non-www. to www. However, since I have strict SSL (HTTPS) enforced, it causes TWO redirects when a visitor enters "example.com" - ie it redirects from "example.com" > "http.://www.example.com" > " https://www.example.com "

Normally this isnt really a concern but when this happens, the TTFB becomes so much longer and nothing loads up except a blank screen.

Please help and advise what can be done to make it a 1 layer redirection from non-www to https://www .

Thanks!

This is probably an issue of combining something you've put in your htaccess and Wordpress's settings.

In Settings > General set both URLs to https://www.yourdomain.com . This should cause only one redirect, and will apply to the whole site. You shouldn't need anything else in your htaccess if this is set up.

If you need https only on certain pages, then that would need to instead be handled in htaccess or a plugin.

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