Zen Cart Logo
Forums / General Questions / http://www. vs Http: How Do I redirect ?

http://www. vs Http: How Do I redirect ?

Locked

Views: 2,764

Results 1 to 7 of 7
This thread is locked. New replies are disabled.
30 Jul 2008, 1:25 AM
#1
milobloom avatar

milobloom

Totally Zenned

Join Date:
Feb 2004
Posts:
1,267
Plugin Contributions:
1

http://www. vs Http: How Do I redirect ?

I don't know if this makes a difference or not.
According to my Seo person he's not sure but it would be better off fixing.

http://nothingbutcostumes.com
to redirect to http://www.nothingbutcostumes.com

Is this done in Zen or do I speak to my Host Provider?

30 Jul 2008, 5:45 AM
#2
misty avatar

misty

Inactive

Join Date:
Apr 2004
Location:
UK
Posts:
5,752
Plugin Contributions:
1

Re: http://www. vs Http: How Do I redirect ?

You can alter both config files to achieve desired result.

30 Jul 2008, 12:03 PM
#3
milobloom avatar

milobloom

Totally Zenned

Join Date:
Feb 2004
Posts:
1,267
Plugin Contributions:
1

Re: http://www. vs Http: How Do I redirect ?

I have everything set in my config files that way.

What I am trying to accomplish is that when you just enter
nothingbutcostumes.com in the url bar it goes to

http://nothingbutcostumes.com/
(However anything you do next goes to a http://www.nothingbutcostumes.com....)
Page.

What I wanted to see if I can make it that when a person enters
nothingbutcostumes.com in the url bar it automatically adjusts to
https://www.nothingbutcostumes.com

Just like if you enter yahoo.com in the url window it converts it to
http://www.yahoo.com/

30 Jul 2008, 12:30 PM
#4
bigbadboy avatar

bigbadboy

Totally Zenned

Join Date:
Apr 2008
Location:
London
Posts:
557
Plugin Contributions:
0

Re: http://www. vs Http: How Do I redirect ?

Put this in your root level htaccess:

RewriteCond %{SERVER_PORT} 80
RewriteCond %{HTTP_HOST} !^www.domain.com$ [NC]
RewriteRule ^(.*)$ http://www.domain.com/$1 [R,L]

obviously changing domain.com to your domain.

3 Aug 2008, 6:58 PM
#6
milobloom avatar

milobloom

Totally Zenned

Join Date:
Feb 2004
Posts:
1,267
Plugin Contributions:
1

Re: http://www. vs Http: How Do I redirect ?

The code you gave me did not work

But a the link showed me to what I was after.

Adding this (Which is the only thing in mine now ) .htaccess file

Options +FollowSymLinks
RewriteEngine on
RewriteCond %{HTTP_HOST} ^nothingbutcostumes.com [NC]
RewriteRule ^(.*)$ http://www.nothingbutcostumes.com/$1 [L,R=301]

Thanks for the help

10 Sep 2008, 12:58 PM
#7
micmed avatar

micmed

Zen Follower

Join Date:
Mar 2008
Location:
The Free South
Posts:
165
Plugin Contributions:
0

Re: http://www. vs Http: How Do I redirect ?

I have tried the same rewrite code and another one suggested to me and they both work to rewrite the URL but it breaks the security on my site. Examples: Admin login no longer works and you cannot login to user accounts or add items to the shopping cart. I have to rename .htaccess in or for things to work correcty again.

https://www.thecablestation.com