[Greanthai] การทำ non-www หรือ www
1. Creating ".htaccess"2. Copy by code...
Redirect www to non-www:<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteCond %{HTTP_HOST} ^www.yourdomain.com
RewriteRule ^(.*)$ http://yourdomain.com/$1
</IfModule>http://greanthai.com
Redirect non-www to www:<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteCond %{HTTP_HOST} ^yourdomain.com
RewriteRule ^(.*)$ http://www.yourdomain.com/$1
</IfModule>http://www.greanthai.com
3. Save and upload same index
4. Enjoy
หน้า:
[1]