กรุณาปิด โปรแกรมบล๊อกโฆษณา เพราะเราอยู่ได้ด้วยโฆษณาที่ท่านเห็น
Please close the adblock program. Because we can live with the ads you see


thxf.org

How To วิธีเพิ่ม https ใน .htaccess

thxf.org 

Administrator

Staff member
Admin
เปิดไฟล์ .htaccess ขึ้นมาแล้วเพิ่ม

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

เข้าไปตามนี้

Apache config:
#    Mod_security can interfere with uploading of content such as attachments. If you
#    cannot attach files, remove the "#" from the lines below.
#<IfModule mod_security.c>
#    SecFilterEngine Off
#    SecFilterScanPOST Off
#</IfModule>

ErrorDocument 401 default
ErrorDocument 403 default
ErrorDocument 404 default
ErrorDocument 405 default
ErrorDocument 406 default
ErrorDocument 500 default
ErrorDocument 501 default
ErrorDocument 503 default

<IfModule mod_rewrite.c>
    RewriteEngine On

    #    If you are having problems with the rewrite rules, remove the "#" from the
    #    line that begins "RewriteBase" below. You will also have to change the path
    #    of the rewrite to reflect the path to your XenForo installation.
    #RewriteBase /xenforo

    #    This line may be needed to workaround HTTP Basic auth issues when using PHP as a CGI.
    #RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}]
    RewriteCond %{HTTPS} off
    RewriteRule ^ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]
    RewriteCond %{REQUEST_FILENAME} -f [OR]
    RewriteCond %{REQUEST_FILENAME} -l [OR]
    RewriteCond %{REQUEST_FILENAME} -d
    RewriteRule ^.*$ - [NC,L]
    RewriteRule ^(data/|js/|styles/|install/|favicon\.ico|crossdomain\.xml|robots\.txt) - [NC,L]
    RewriteRule ^.*$ index.php [NC,L]
</IfModule>

แล้ว save จากนั้นทดสอบเปิด browser ดูครับ

:th_113_:
 


Similar threads

  • Article Article
เพิ่มข้อความด้านล่างในไฟล์ .htaccess : ด้านล่างคือเชค https กับ redirect none www to www: :5fc0f220:
Replies
0
Views
1K
thxf.org 
This resource is not affiliated with XenForo Ltd. If you want to provide an extra layer of protection to admin.php and the /install directory, you can do so with .htaccess. Protecting admin.php To...
Replies
0
Views
1K
thxf.org 
Redirection Script for phpBB 3.2/3.3+ (without SEO URLs) htaccess สคริปนี้ต้องเปิดใช้ระบบ friendly urls ในตัว Xenforo ด้วยครับ. ทำงานอย่างไร "/viewforum.php?f=X" รีไดเร็กเป็น "/forums/X/" และ...
Replies
0
Views
15K
thxf.org 

กรุณาปิด โปรแกรมบล๊อกโฆษณา เพราะเราอยู่ได้ด้วยโฆษณาที่ท่านเห็น
Please close the adblock program. Because we can live with the ads you see
Back
Top Bottom