 |
|
|
| View previous topic :: View next topic |
| Author |
Message |
alyson
Joined: 22 Mar 2008 Posts: 17
|
Posted: Fri May 15, 2009 10:46 am .htaccess file help |
|
|
|
Hi all (again sorry)
dont really know if this is is the correct topic but I did do a search first !!
I use angelfire to host my site, and to me google searches and other engines are very important and after my last review of my seo I came accross a report that indicated I should redirect my .domainname.com to www.mydomainname.com but I cant get my htaccess file to work on angelfire nor do I get support to do so (in writing !)
question
on the server I have a file the.htaccess that makes my ssi files work but adding the code for a 301 for 'mydomain.com' to 'www.mydomain.com code as
Options +FollowSymlinks
RewriteEngine on
rewritecond %{http_host} ^domain.com [nc]
rewriterule ^(.*)$ http://www.domain.com/$1 [r=301,nc]
as instructed on all the google searches I have tried does not work.
I have reports that say I am penelised by google for duplicate content on http://mysite and http://www.mysite
but if the.htaccess works for ssi includes how can I redirect http:mydomain.com to http://www.mydomain.com
please ???
alyson
knowlegable chicken keeper ! |
|
kanenas

Joined: 14 Dec 2004 Posts: 310
|
Posted: Sun May 17, 2009 2:15 pm The code works |
|
|
|
The configuration you posted works for me. The capitalization of the RewriteCond and RewriteRule lines isn't standard, but that didn't make a difference when I tested it. Contact AngelFire support to see if they support rewrites. You can also try a simpler RewriteRule to make sure rewrites are working:
| Code: |
RewriteEngine on
RewriteRule ^/?foo.html /bar.html |
Create bar.html and go to "http://www.mydomain.com/foo.html". If you get a 404, you know the rewrite engine is disabled.
For reference, here's the standard capitalization for the Rewrite* lines:
| Code: |
Rewritecond %{HTTP_HOST} ^domain.com [NC]
RewriteRule ^(.*)$ http://www.domain.com/$1 [R=301,NC] |
|
|
alyson
Joined: 22 Mar 2008 Posts: 17
|
Posted: Thu May 28, 2009 10:14 am |
|
|
|
thank you for answering, will try this later, sorry not to have seen before
a |
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|
|
|
|
 |
|
|
|
|
|
|
|