Page is a not externally linkable
- Code, Content, and Presentation
-- Apache Web Server
---- Newbie question about name servers


Str82u - 4:35 pm on Nov 10, 2012 (gmt 0)


Here's something I use in htaccess:
RewriteCond %{HTTP_HOST} ^example.com [OR]
RewriteCond %{HTTP_HOST} ns1.example.com [OR]
RewriteCond %{HTTP_HOST} ns2.example.com
RewriteRule (.*) http://www.example.com/$1 [R=301,L]

It's the same as rewriting your non-www to www, note the "R=301", it tells search engines like Google this is permanent.

EDIT: Chnged domain to example.com

[edited by: Str82u at 5:13 pm (utc) on Nov 10, 2012]


Thread source:: http://www.webmasterworld.com/apache/4517793.htm
Brought to you by WebmasterWorld: http://www.webmasterworld.com