Download Articles Stats About us Contact us
HomePHP

.htaccess redirect subfolder to HTTPS และเติม www ด้วย

Options +FollowSymLinks
RewriteEngine On

RewriteCond %{HTTP_HOST} !localhost
RewriteCond %{HTTP_HOST} !^192\. [NC]
RewriteCond %{HTTP_HOST} !^www\. [NC]
RewriteRule .* http://www.%{HTTP_HOST}%{REQUEST_URI} [L,R=301]

RewriteCond %{HTTP_HOST} !localhost
RewriteCond %{HTTP_HOST} !^192\. [NC]
RewriteCond %{HTTPS} off
RewriteRule ^(adm|test|sample)/$ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]

9 ส.ค. 62
© 2000 - 2024 palthai.com. All rights reserved.