HTML Tutorial


 Forum HomeForum Home   FAQFAQ   SearchSearch   MemberlistMemberlist   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 
RegisterRegister - Not registered yet? Got something to say? Join HTML Code Tutorial!
.htaccess file help
Post new topic   Reply to topic    HTML Help Forum Index -> Free Hosting
View previous topic :: View next topic  
Author Message
alyson



Joined: 22 Mar 2008
Posts: 17

PostPosted: Fri May 15, 2009 10:46 am     .htaccess file help Reply with quote

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

PostPosted: Sun May 17, 2009 2:15 pm     The code works Reply with quote

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

PostPosted: Thu May 28, 2009 10:14 am     Reply with quote

thank you for answering, will try this later, sorry not to have seen before

a
Display posts from previous:   
Post new topic   Reply to topic    HTML Help Forum Index -> Free Hosting All times are GMT - 8 Hours
Page 1 of 1

 
Jump to:  
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
HTML Help Archive
Powered by phpBB © 2001, 2005 phpBB Group
HTML Help topic RSS feed 

 
DARFUR
HOSTING / DESIGN
MAKE MONEY

Home
  |   Tutorials   |   Forum   |   Quick List   |   Link Directory   |   About
Copyright ©1997-2002 Idocs and ©2002-2007 HTML Code Tutorial