QUOTE (kumar @ Jul 29 2008, 09:31 AM)

Hi,
I want to redirect my non www.domain.com to www.domain.com using 301 redirect through the .htaccess file, for this purpose i put the following lines of code on the .htaccess file but it did not redirect as expected.
Options +FollowSymlinks
RewriteEngine on
rewritecond %{http_host} ^peoplesearch.com [nc]
rewriterule ^(.*)$
http://www. peoplesearch.com/$1 [R=301,L]
So can you please help me to resolve this issue.
Thanks,
kumar
Are you using UNIX?
.htaccess redirects will not work on Windows hosting packages.
for Windows, you can add some asp lines to the top of your ASP pages (before anything is written to the browser.)
CODE
Dim sURL:sURL = Request.ServerVariables("HTTP_HOST")
Dim sdomain:sdomain = split(sURL, ".")
If sdomain(1) <> "netsolhost" Then
If sdomain(0) <> "www" Then
newAdd = "http://www." & sURL
Response.Status="301 Moved Permanently"
Response.AddHeader "Location", newAdd
End If
End If
- Duane