Forum Moderators: open
Look at the following:
when I use http*//www.example.com/ I get 98 backlinks
when but when I use www.example.com I get 512 backlinks
and when I use example.com I get more backlinks
why and which one counts.
[edited by: pageoneresults at 1:21 am (utc) on Feb. 24, 2004]
[edit reason] Examplified URIs [/edit]
use a 301 to redirect from example.com to www.example.com or vice versa. A 301 redirection is recommended by Google. A meta refresh is a different type of redirection. Although a meta redirection doesn't seem to cause problems, I would use a 301 redirection.
Here's the correct link. [webmasterworld.com]
RewriteEngine On
Options +FollowSymlinks
RewriteBase /
RewriteCond %{HTTP_HOST} ^example\.com
RewriteRule ^(.*)$ [example.com...] [R=permanent]
I've seen this and various other references to 301s. But this all assumes several things. On our shared hosting, Windows 2000 based, Frontpage 2000 site I've never figured where to put this code/how to use 301 to redirect a page :-(
What server does the window's server run? If apache then I *think* that you can use .htaccess files - but I'm not sure if Mod_Rewrite exists for Windows platforms.
Other than that, you'll probably have to talk to your ISP and get them to do some fancy ISAPI filtering to do the redirect on windows - not sure though.
>> What server does the window's server run?
You've got me there. I thought that a window's server uses er.. Windows as the server software. When talking Windows/Apache isn't it a case of your server having one or the other?
Or is that Apache thing people refer to equivalent to "IIS" on a Windows server?
Apache is more commonly found on *nix platforms (because it comes pre-installed on a lot of them, plus it's powerful), whereas windows servers usually come bundled with IIS (Internet Information Services) which acts as a web server, ftp server etc..
Apache can be installed on Windows servers, but it's not as common as IIS on windows.
IIS does not understand .htaccess - but I *think* that is apache is used as the server instead of IIS then you can use .htaccess - not 100% sure though...
Fundamentally - the code above should be placed in 1 of 2 places:
1) On a dedicated box, put it in the httpd.conf file. Code here executes faster than .htaccess files
2) On a shared server, put it in your .htaccess file (in the WEB-ROOT).