Zen Cart Logo
Forums / General Questions / 301 Redirect issue

301 Redirect issue

Locked

Views: 2,930

Results 1 to 17 of 17
This thread is locked. New replies are disabled.
11 Mar 2009, 11:25 PM
#1
mw4kids avatar

mw4kids

Zen Follower

Join Date:
Oct 2008
Posts:
403
Plugin Contributions:
0

301 Redirect issue

Hello,
I am trying to upload an .htaccess file to my root so i can redirect my thrift4kids.com to https://www.thrift4kids.com. I've created the file on my desktop using Notepad> saved as '**.htacess' **which had the following info:

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

I uploaded it to my root (under public_html) and my non www site is still not being redirected to my www site.

I tried it again and it's uploaded the file again and it's stuck on page that says 'Waiting for File Manager to Refresh'. Appears to be working on something but it's been going on for some time.

Does anyone have any idea what i may being doing wrong?

11 Mar 2009, 11:32 PM
#2
mate2009 avatar

mate2009

New Zenner

Join Date:
Feb 2009
Location:
Manchester, United Kingdom
Posts:
18
Plugin Contributions:
0

Re: 301 Redirect issue

Might me a silly suggestion but you did get rid of the .txt extesion after uploading?

Regards

11 Mar 2009, 11:34 PM
#3
mickyelta avatar

mickyelta

New Zenner

Join Date:
Nov 2006
Posts:
67
Plugin Contributions:
0

Re: 301 Redirect issue

this my be a silly as .htaccess has 2 c's in it

11 Mar 2009, 11:39 PM
#4
mate2009 avatar

mate2009

New Zenner

Join Date:
Feb 2009
Location:
Manchester, United Kingdom
Posts:
18
Plugin Contributions:
0

Re: 301 Redirect issue

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

Also try this

11 Mar 2009, 11:40 PM
#5
mate2009 avatar

mate2009

New Zenner

Join Date:
Feb 2009
Location:
Manchester, United Kingdom
Posts:
18
Plugin Contributions:
0

Re: 301 Redirect issue

Mickyelta

Yep well spotted

11 Mar 2009, 11:45 PM
#6
mw4kids avatar

mw4kids

Zen Follower

Join Date:
Oct 2008
Posts:
403
Plugin Contributions:
0

Re: 301 Redirect issue

yeah, i spelled it wrong on the thread, but the actual file it's spelled correctly and it doesn't have the .txt extension...

I'll see if the other code works now.

thanks!!

11 Mar 2009, 11:48 PM
#7
mate2009 avatar

mate2009

New Zenner

Join Date:
Feb 2009
Location:
Manchester, United Kingdom
Posts:
18
Plugin Contributions:
0

Re: 301 Redirect issue

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

Sorry forget the first bit of code, this does work on my site
www.########-lingerie-boutique.co.uk, the only diffrence is im using SSU but i dont think this matters

Regards
Mate

11 Mar 2009, 11:56 PM
#8
mw4kids avatar

mw4kids

Zen Follower

Join Date:
Oct 2008
Posts:
403
Plugin Contributions:
0

Re: 301 Redirect issue

nope :no: didn't work with that code.

I currently have an htaccess file (0 bytes) on my root- when I attempted to upload the new htaccess file I click overwrite, although that doesn't seem to work either.

Also, it has a permission of 0644 (don't know if that has anything to do with it)

11 Mar 2009, 11:58 PM
#9
mate2009 avatar

mate2009

New Zenner

Join Date:
Feb 2009
Location:
Manchester, United Kingdom
Posts:
18
Plugin Contributions:
0

Re: 301 Redirect issue

0664 is correct, although on some servers its common to delet the file and the upload the new one,

(i would back it up or even rename it just in case) and the code defo works

12 Mar 2009, 12:03 AM
#10
mw4kids avatar

mw4kids

Zen Follower

Join Date:
Oct 2008
Posts:
403
Plugin Contributions:
0

Re: 301 Redirect issue

the second code didn't work either unfortunately. will try the next suggestion....thanks!

12 Mar 2009, 12:13 AM
#11
mate2009 avatar

mate2009

New Zenner

Join Date:
Feb 2009
Location:
Manchester, United Kingdom
Posts:
18
Plugin Contributions:
0

Re: 301 Redirect issue

No probs
Just to clarify that you keep all the code you posted, just replace the two lines that are edited

12 Mar 2009, 12:54 AM
#12
mw4kids avatar

mw4kids

Zen Follower

Join Date:
Oct 2008
Posts:
403
Plugin Contributions:
0

Re: 301 Redirect issue

my web host sent me a tutorial and it said I should upload the htaccess file to the website's main site folder...can I assume this is the same as the root directory?

12 Mar 2009, 12:56 AM
#13
mw4kids avatar

mw4kids

Zen Follower

Join Date:
Oct 2008
Posts:
403
Plugin Contributions:
0

Re: 301 Redirect issue

mate2009:

No probs
Just to clarify that you keep all the code you posted, just replace the two lines that are edited

yeah did that, but didn't work...thanks for the clarification

12 Mar 2009, 1:11 AM
#14
mw4kids avatar

mw4kids

Zen Follower

Join Date:
Oct 2008
Posts:
403
Plugin Contributions:
0

Re: 301 Redirect issue

mate2009:

0664 is correct, although on some servers its common to delet the file and the upload the new one,

(i would back it up or even rename it just in case) and the code defo works

tried this and it seems to have uploaded but still no success: i tried this code now and per my host's original suggestion:

RewriteEngine on
RewriteCond %{HTTP_HOST} !^www.thrift4kids.com$
RewriteRule ^(.*)$ http://www.thrift4kids.com/$1 [R=301]

is the coding off with this one?

12 Mar 2009, 3:23 AM
#15
mprough avatar

mprough

Totally Zenned

Join Date:
Nov 2007
Location:
Woodbine, Georgia, United States
Posts:
4,290
Plugin Contributions:
39

Re: 301 Redirect issue

Use file manager to open the htaccess and paste your code in the next available line.

~Melanie

12 Mar 2009, 5:07 AM
#16
mw4kids avatar

mw4kids

Zen Follower

Join Date:
Oct 2008
Posts:
403
Plugin Contributions:
0

Re: 301 Redirect issue

after a looonnng day of working at this, my webhost was kind enough to figure it out and do it for me.

thanks again everyone for their help...much appreciated.

bedtime now :sleepy:

12 Mar 2009, 5:58 PM
#17
mate2009 avatar

mate2009

New Zenner

Join Date:
Feb 2009
Location:
Manchester, United Kingdom
Posts:
18
Plugin Contributions:
0

Re: 301 Redirect issue

Hi no problem, maybe you could post what worked for future refrence

Regards
Mate