Forums / General Questions / example.com ----> www.example.com

example.com ----> www.example.com

Locked

Started by canemasters on 7 Jun 2007, 2:46 AM · Views: 1,301

Results 1 to 5 of 5
This thread is locked. New replies are disabled.
7 Jun 2007, 2:46 AM
#1
canemasters avatar

canemasters

Zen Follower

Join Date:
Mar 2007
Posts:
444
Plugin Contributions:
0

example.com ----> www.example.com

What do I need to do to forward everybody that visits my site at hardwoodcanes.com to https://WWW.hardwoodcanes.com?

My flash headers buttons wont work properly for some reason unless I put the WWW in my url

strange!

Canemasters
www.canemasters.com

7 Jun 2007, 3:35 AM
#2
get_em_fast avatar

get_em_fast

Totally Zenned

Join Date:
Dec 2006
Location:
Seligman, MO U.S.A.
Posts:
2,072
Plugin Contributions:
1

Re: example.com ----> www.example.com

Canemaster.......it's already doing that. I just typed in the URL without the www, and it took me straight to your site.
Love your buttons!

Teach them to shop and they will shop today;
Teach them to Zen and they will OWN a shop tomorrow!

7 Jun 2007, 5:05 AM
#3
canemasters avatar

canemasters

Zen Follower

Join Date:
Mar 2007
Posts:
444
Plugin Contributions:
0

Re: example.com ----> www.example.com

Why thank you! I made them with adobe flash cs3.

It's not working for me though. I type in hardwoodcanes.com and it takes me to http://hardwoodcanes.com/

I guess I have 2 fixes possible... make the flash headers buttons work weather somebody is at http://hardwoodcanes.com/ or http://www.hardwoodcanes.com , or figure out why this forwarding works for some and not for others.

Canemasters
www.canemasters.com

7 Jun 2007, 5:15 AM
#4
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,511
Plugin Contributions:
176

Re: example.com ----> www.example.com

Your .htaccess in the root of your Zen Cart folder can be used to handle this.

Add something like this, changing the_domain_name appropriately:```

insert www if not present

RewriteEngine On
RewriteCond %{HTTP_HOST} !^www.[B]the_domain_name[/B].com [NC]
RewriteRule ^(.*)$ http://www.[B]the_domain_name[/B].com/$1 [L,R=301]

end www fix

.
Zen Cart - putting the dream of business ownership within reach of anyone!
Donate to: DrByte directly or to the Zen Cart team as a whole

Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

7 Jun 2007, 6:20 AM
#5
canemasters avatar

canemasters

Zen Follower

Join Date:
Mar 2007
Posts:
444
Plugin Contributions:
0

Re: example.com ----> www.example.com

doh! I found the solution on google by searching 301 redirect. Thank you anyways though drbyte! Shouldn't this help the search engines as well?

I made mine say this

Options +FollowSymlinks
RewriteEngine on
rewritecond %{http_host} ^hardwoodcanes.com [nc]
rewriterule ^(.*)$ http://www.hardwoodcanes.com/$1 [r=301,nc]

Canemasters
www.canemasters.com