logo-dw

Go Back   Dreamweaver Club Forums > Dreamweaver forums > Dreamweaver General
Register FAQ Members List Search Today's Posts Mark Forums Read

Reply
 
Thread Tools Display Modes
Old 09-25-2014, 09:33 PM   #1
MikeyRitz
 
Join Date: Nov 2012
Posts: 15
Default One URL For SEO Benefits

Thought I'd start a new thread to better explain the problem.

I have several ways of reaching my website:

http://www.abcxyz.com/
http://abcxyz.com/
http://www.abcxyz.com/index.html
http://abcxyz.com/index.html

Ideally, I want all the other redirected to http://www.abcxyz.com/ only.

I know how to do 301 redirect for individual pages and I've tried 301 redirecting the complete domain, but not sure if I'm not putting in the correct code.

I'm causing myself duplicate content problems and wasting valuable link juice when it should be condensed to one domain.

Any help most appreciated.
MikeyRitz is offline   Reply With Quote
Old 09-25-2014, 11:56 PM   #2
edbr
edbr's Avatar
 
Join Date: Aug 2005
Location: Bali
Posts: 11,164
Default

# Redirect non-www urls to www
RewriteEngine on
RewriteCond %{HTTP_HOST} !^www\.yoursite\.com
RewriteRule (.*) http://www.yoursite.com/$1 [R=301,L]
__________________
If you're happy and you know it shake your meds!
different style links examples

Flight / Hotel search
Free script download
Bali Villas
edbr is offline   Reply With Quote
Old 09-26-2014, 01:11 AM   #3
MikeyRitz
 
Join Date: Nov 2012
Posts: 15
Unhappy 403 Forbidden

Many thanks.
I'm getting this now when typing in the url:
Forbidden

You don't have permission to access / on this server.
Additionally, a 404 Not Found error was encountered while trying to use an ErrorDocument to handle the request.

Never had this before.

Code put in .htaccess file:

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

index.html is still available and does not convert to www.
MikeyRitz is offline   Reply With Quote
Old 09-26-2014, 01:34 AM   #4
MikeyRitz
 
Join Date: Nov 2012
Posts: 15
Default Ignore previous post

Me again Please ignore previous post.

I noticed that when I was typing in the url it began with https and not http has it should have done, hence the 403 forbidden messages.

It is working fine so thanks for your help.

The only problem now is that /index.html is still there and it does not convert to the www.
MikeyRitz is offline   Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 05:46 AM.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2017, vBulletin Solutions, Inc.
Copyright 2006 DreamweaverClub.com