สาระน่ารู้เรื่อง Website Wordpress SEO

บังคับให้ทุก url ใช้ https ด้วย htaccess

Tags :

lock

แม้จะตั้งค่าเว็บเราจากใน host ให้เป็น https:// แล้ว ก็ยังต้องบังคับให้เว็บใช้ https:// ด้วย ทำได้ดังนี้

เอาโค้ดนี้แปะใน .htacess เพิมเข้าไปด้านบน ไม่ต้องลบของเก่านะ (host ruk-com นะครับ)

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

และกำหนด define code ข้างล่างนี้เหนือคำว่า above the “That’s all, stop editing!” ใน wp-config.php file:
define('FORCE_SSL_ADMIN', true);

หรือใช้ปลั๊กอินที่ชื่อ : Really Simple SSL

ref : http://www.wpbeginner.com/wp-tutorials/how-to-add-ssl-and-https-in-wordpress/

สงสัยสอบถามเพิ่มเติม หรือติดต่อเรียนทำเว็บด้วย Wordpress กับเราได้ที่ :

LINE ID

@webwithwp

Facebook

@webwithwp

Instagram

@webwithwp

Youtube

@webwithwp

แชร์บทความไปยัง

Facebook
Twitter
LinkedIn
Telegram

More
articles

Scroll to Top