Microsoft
Software
Hardware
Network
Question : 301 redirect non-www to www
I am using the following to redirect
http://mysite.com
to
http://www.mysite.com
. I want to ensure that I'm doing it correctly and that it's a "permanent" redirect. (I'm still very new to such things.) It is working properly, I just want to make sure it's the correct way to do it.
RewriteEngine On
RewriteCond %{HTTP_HOST} ^mysite.com [NC]
RewriteRule ^(.*)$
http://www.mysite.com/$1
[L,R=301]
Answer : 301 redirect non-www to www
I would do it with a slight change:
RewriteCond %{HTTP_HOST} ^mysite.com$ [NC]
RewriteRule .?
http://www.mysite.com%
{REQ
UEST_URI} [R=301,L]
HTH
Random Solutions
PHP Regex
How to push mysql result into php array
JavaScript, arrays, and DropDown
Encrypt the database backup file
ODBC doesn't resolve DNS correctly - Great Plains issue, Windows 7?
Unable to find an entry point named in dll
VSS Snapshot warning. File c:\windows\system32\vmbusp
ipe.dll is not present
Error: SQLSTATE[24000]: Invalid cursor state
iPhone, how do I correctly pass data model object data between various view controllers without breaking MVC?
Infering View Definition