ผมอยากให้ ชี้ไปที่ ssl https อย่างเดียว

เริ่มโดย ., 08 กันยายน 2017, 19:33:24

หัวข้อก่อนหน้า - หัวข้อถัดไป

0 สมาชิก และ 1 ผู้มาเยือน กำลังดูหัวข้อนี้

.

ผมได้เชื่อม host แล้ว แต่ติดปัญหาที่ มี
http://
http://www
https://
https://www

ผมอยากให้ ชี้ไปที่แค่ https://  จะทำยังไงครับ ใช้ name.com


dermapond

#2
อ้างถึงRewriteEngine On
RewriteCond %{HTTP_HOST} ^domain.com [NC]
RewriteRule ^(.*)$ http://www.domain.com/$1 [L,R=301]

เพิ่มในไฟล์ .htaccess ครับ
ลองดูครับ
แสงประกายดอทคอม

WordPress Hosting เร็ว แรง มาก ฟรี SSL ระบบ Cpanel เลือก PHP 4.4-8.4 ได้ รองรับ Node.js, Python

metrosexual


RewriteEngine On
RewriteCond %{SERVER_PORT} 80
RewriteRule ^(.*)$ https://yourdomain.com/$1 [R,L]


.htaccess สร้างไฟล์ชื่อนี้เพิ่มไปเลยครับ ให้อยู่ที่เดียวกับ index นะ

2DTH

ลองเอามาให้ครับ
RewriteEngine On
RewriteCond %{HTTP} on
RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI}  [R=301,L]

หรือ
RewriteCond %{HTTP:X-Forwarded-Proto} =http
RewriteRule ^(.*)$ https://%{HTTP_HOST}%{REQUEST_URI}  [L,R=301]

หรือตัวนี้
RewriteCond %{SERVER_PORT} ^443$ [OR]
RewriteCond %{HTTP} on
RewriteRule  ^(.*)$ https://%{HTTP_HOST}%{REQUEST_URI}  [R=301,L]

RewriteBase /
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
[direct=//2dth.cloud][/direct]
เหมียวๆ - [direct=//2dth.com]เว็บดูอนิเมะออนใลน์ไม่มีป๊อปอัพ[/direct]
[direct=//i-vid.online]ระบบตัวเล่นวิดีโอ ออนไลน์[/direct]
[direct=//2dth.club]2DTH[/direct] [direct=//bit.ly/wyvernstudio]WyvernStudio[/direct]
:wanwan017:ย่อลิงค์ถอนไว:wanwan017:
โฮสฟรี 2DTHCloud โฮสถูกเริ่มต้น 10 บาท พื้นที่เยอะ รองรับถึง 10000คน RDP|API|FILES SG|TH|US|NL 0.5วิ

Gentoo

ผมใช้อันนี้ครับ

RewriteEngine On
RewriteCond %{HTTPS} !on [OR]
RewriteCond %{HTTP_HOST} !^www\.
RewriteRule (.*) https://www.screen168.com%{request_uri} [L,R=301]
[direct=https://www.pic2free.com]ฝากรูป[/direct]
[direct=https://www.screen168.com]เสื้อยืด[/direct]
[direct=https://www.screen168.com]รับสกรีนเสื้อ[/direct]
[direct=https://www.screen168.com]พิมพ์เสื้อ[/direct]
[direct=https://www.screen168.com]รับพิมพ์เสื้อ[/direct]

shinomura

ผมเพิ่งแก้ปัญหานี้ไป โดยใช้ .htaccess ใส่ไว้ใน public_html แต่ของผมให้มันรีไดเรคไปที่ htts://www... ทั้งหมด
ยกตัวอย่าง
http://domain.com ==> https://www.domain.com
http://www.domain.com ==> https://www.domain.com

ถ้าต้องการแบบอื่นต้องแก้ไขเอานิดหน่อย

<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
# redirect http://www.example.com to [url]https://www.example.com[/url]
RewriteCond %{HTTP_HOST} ^www\. [NC]
RewriteRule ^ [url]https://%{HTTP_HOST}%{REQUEST_URI}[/url] [R=301,L]
RewriteBase /
# redirect http(s)://example.com to [url]https://www.example.com[/url]
RewriteCond %{HTTP_HOST} !^www\. [NC]
RewriteRule ^ [url]https://www.%{HTTP_HOST}%{REQUEST_URI}[/url] [R=301,L]
RewriteBase /
RewriteRule ^index.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>

darkknightza

อ้างถึงจาก: dermapond ใน 08 กันยายน 2017, 22:11:42
อ้างถึงRewriteEngine On
RewriteCond %{HTTP_HOST} ^domain.com [NC]
RewriteRule ^(.*)$ http://www.domain.com/$1 [L,R=301]

เพิ่มในไฟล์ .htaccess ครับ
ลองดูครับ
:wanwan017:
[direct=http://make-more-moneyy.blogspot.com/2012/10/adfly.html]หาเงินวันละ350บาท มั่นคง จ่ายมาสิบปีแล้ว[/direct]
[direct=https://www.popads.net/users/refer/519628]หารายได้กับ popup เจ้านี้ เรทแรงคลิ๊ก[/direct]
Hosting อันดับ 1 คุณภาพสูง ราคาถูก จัดเลย[direct=https://support.hostneverdie.com/aff.php?aff=504][/direct]
โดเมนเนมสวยๆ ราคาถูก จดกับเราสิ[direct=https://my.thaidatahosting.com/aff.php?aff=227]ที่นี่

.