Apache ~ redirect domain.com to www.domain.com

xxx.com to www.xxx.com
------------------------------------------------------------------------------------------------
RewriteEngine on
RewriteCond %{HTTP_HOST} ^xxx\.com
RewriteRule ^(.*)$ http://sfdgsdgewrg.qwertqrwtqegagesfag.com/$1 [R=permanent,L]
------------------------------------------------------------------------------------------------


www.xxx.com to xxx.com
------------------------------------------------------------------------------------------------
RewriteEngine on
RewriteCond %{HTTP_HOST} !^xcbsegsertfgesrtg\.com$ [NC]
RewriteRule ^(.*)$ http://xcvbsdfhgbrsgsdfgvb.com/$1 [R=301,L]

------------------------------------------------------------------------------------------------

reference
http://www.cyberciti.biz/faq/apache-redirect-domaincom-to-wwwdomaincom/

沒有留言:

發佈留言