nolen1 Posted August 12, 2003 Posted August 12, 2003 Hello, Are domains found by using this http://domain.com and http://www.domain.com. Will I be aloud to use mod_rewrite? And will this work in my .htaccess file to redirect http://www.domain.com to http://domain.com? Options +FollowSymLinks RewriteEngine on RewriteCond %{HTTP_HOST}!^domain\.com RewriteRule (.*) http://domain.com/$1 [R=permanent,L] I'm having a problem with three of my sites. I was doing good in Google until my listings switched from http://**** to *****. Most of the incoming links are pointing to http://**** without www. so my I have went from top five for my keywords to numbers like eighty eight. I From what I've read I guess this happened because other sites linked to mine the two different ways. I didn't know it mattered both urls go to my site. I read about several people that added a 301 redirect like this Options +FollowSymLinks RewriteEngine on RewriteCond %{HTTP_HOST}!^domain\.com RewriteRule (.*) http://domain.com/$1 [R=permanent,L] to their .htaccess file and Google merged the two urls and they keep their page rank and incoming links. I tried to add many versions that I have found and they won't work. I works when I redirect permenant to another page or domain using something like this redirect permanent / http://www.anydomain.com/ but I can't use mod_rewrite. My hosting company said that mod_rewrite is enabled but that they tried several versions of mod_rewrite their self and they couldn't get it to work either they said it must not be compatible with their server. They said that they couldn't make a 301 redirect for me because it may affect other people's accounts. I'm afraid that Google's going to penalize me for having duplicate content since they consider with www. and without two different urls. Thank you, Karen Quote
TCH-Rob Posted August 12, 2003 Posted August 12, 2003 Karen, I do not know about the rest but my site works with and without the www. I believe the CName records are set up to point so your www subdomain points to the IP address your account is hosted on. The non www domain = the IP when your account is created. You shouldnt have to use mod_rewrite. Quote
Head Guru Posted August 12, 2003 Posted August 12, 2003 Hi, We do support mod_rewrite on all our servers. I think your spinning your wheels on this one however. Any site hosted here will work with or with the www extension. However, several people are using mod_rewrite to do other things, so you should have no issues. Bill Quote
arvind Posted February 7, 2005 Posted February 7, 2005 Speaking about mod_rewrite I seem to be having a problem with my mod_rewrite. This is for the dynamic templating in MT. I have ><IfModule mod_rewrite.c> <IfModule mod_dir.c> DirectoryIndex index.php index.html index.htm default.htm default.html default.asp /mtview.php </IfModule> RewriteEngine on RewriteCond %{REQUEST_FILENAME} !-d RewriteCond %{REQUEST_FILENAME} !-f RewriteRule ^(.*)$ /mtview.php [L,QSA] </IfModule> that basically says server the mtview.php file is the request isn't for a real directory or file. However this isn't working correctly. If the file physically exists but is erroring out (eg 500 premature end of script errors) mtview.php is being served. This makes troubleshooting problems very difficult because the mtview.php file is being served and I can't trace the error from the browser side nor that error log. Any ideas ? Quote
Amiya Posted February 8, 2005 Posted February 8, 2005 mod_rewrite is supported. I also rewrite all URL's to the non-www address. I'm sure Google allows for links with & without the www. I used these rules from http://no-www.org > RewriteEngine On RewriteCond %{HTTP_HOST} ^www\.domain\.com$ [NC] RewriteRule ^(.*)$ http://domain.com/$1 [R=301,L] Quote
TCH-Don Posted February 8, 2005 Posted February 8, 2005 Welcome to the Family Karen and Amiya and your new home! We really are like family here. So if you need anything, just ask your new family! We love to help Quote
TCH-Bruce Posted February 8, 2005 Posted February 8, 2005 Welcome to the forums Karen and Amiya! Quote
TCH-RobertM Posted February 8, 2005 Posted February 8, 2005 Hi Karen and Amiya, Both welcome to the forums Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.