Jump to content

Recommended Posts

Posted (edited)

I have got my website to redirect from examplesite.com to www.examplesite.com with this code:

 

RewriteEngine on

Options +FollowSymLinks

<IfModule mod_rewrite.c>

RewriteCond %{HTTP_HOST} ^examplesite\.com$ [NC]RewriteRule ^(.*)$ http://www.examplesite.com/$1 [R=301,L]

</IfModule>

 

 

And I found this code to redirect from www.examplesite.com/index.html to www.examplesite.com :

 

RewriteCond %{HTTP_HOST} ^examplesite.com

RewriteRule (.*) http://www.examplesite.com/$1 [R=301,L]

RewriteRule ^$ index.html

 

I've been using the first one already and was wanting to also implement the second one, but didn't want to do it wrong and there is something I read about looping which means longer load time??

 

How do I write it to insert into .htaccess for it to work properly. If you paste the code, could you put it into quotes so I can just cut and paste. I have been searching for this answer for some time now and can never get a straight answer or solution. I don't think I'm being penalized by any search engines, but I do get two different PR values from Google for each. I'd just like to get everything redirecting to www.examplesite.com. Thanks!

Edited by BluegrassGardener

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...