Welcome to WebmasterWorld Guest from 54.227.110.209

Forum Moderators: phranque

Message Too Old, No Replies

Host says no 301 redirect in htaccess

new site, new host, no 301's

     

texasville

6:46 pm on Oct 17, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



I just completed a site for a friend that needs this site to drum up some business for her interior decorating. I told her which host to go with. Unfortunately she got confused and has already paid for a year at another host.
Tried to make the best of it but kind of froze when I see I have no access to the .htaccess folder. Moved on. Uploaded the site but before I start a link program and try to get it indexed, decide to write the host and ask for them to do the 301 redirect non-www to www so as to head off problems with google.
Just got this letter back-

>>Dear Sir,

<paraphrased>

Due to technical limitations redirects using .htaccess are not possible. Redirects are possible in php.

<<

I wasn't expecting that one. This site is completely html. She can't afford another hosting fee. And I am doing this whole site as a friend. (read-free)What to do, what to do.

[edited by: trillianjedi at 9:46 am (utc) on Oct. 29, 2005]
[edit reason] Please see TOS re email quotes - paraphrasing [/edit]

2by4

2:25 am on Oct 18, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



get a new hoster, don't waste your time, if it's straight html you can get a basic one for $3 month or so, as fees go, I don't know, if someone doesn't want to spend $3 a month, the amount of time I'll spend helping them for free is pretty finite.

mcavic

4:42 am on Oct 18, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



301 redirect non-www to www so as to head off problems with google

The host should really do that for you... it can be done in the Apache configuration. But actually, since it's already paid for and running, I wouldn't worry about it.

I've seen sites with duplicate www and non-www pages listed in Google... Google will just hide one of them. The important thing is that all of her inbound links look the same. If half of the links disagree with the other half, then her PageRank will basically be cut in half.

Marcia

4:55 am on Oct 18, 2005 (gmt 0)

WebmasterWorld Senior Member marcia is a WebmasterWorld Top Contributor of All Time 10+ Year Member



>>already paid for a year at another host.

Most hosts have a 30 day money back guarantee. If they don't allow something so simple and basic and necessary, then ask for the money back and let the sales department know why.

Incidentally, there's no .htaccess folder, it's just a simple text file you create in the root of the site, where the index.html is.

kaled

9:59 am on Oct 18, 2005 (gmt 0)

WebmasterWorld Senior Member kaled is a WebmasterWorld Top Contributor of All Time 10+ Year Member



The moral of this story is don't give people the opportunity to make mistakes. You should have sat beside her when signing up.

Having said that, as a general rule, I never believe what tech support people tell me - 9/10 talk complete rubbish. As Marcia hinted, try installing a .htaccess file - it might work.

Kaled.

texasville

2:13 pm on Oct 18, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Yes, you would think the host would do this. But on to Marcia's statement. I've never been on an apache server so new experience. What do I title the file exactly? I just drop it in my root folder? Seems contrary to everything I have read. I know the code so no problem.
Kaled-because of our schedules, I just couldn't be there. And it was an extremely well known registrar that directed her to this host. I don/t know what happened.
Well, onward and upward. I just don't want to have to move the site. Royal Pain.

texasville

2:17 pm on Oct 18, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Plus I wrote them back andasked them to add a CNAME record with the non-www version pointing to the www version.
I understand this also works. Any input?

topr8

2:17 pm on Oct 18, 2005 (gmt 0)

WebmasterWorld Senior Member topr8 is a WebmasterWorld Top Contributor of All Time 10+ Year Member



you just name the file

.htaccess

and drop it into any folder to be active in that folder, eg if in the root it affects the whole site. if in a sub folder only that folder and its children.

it most likely will work fine

texasville

2:24 pm on Oct 18, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



topr- I created the text file and tried to upload it but was told ".htaccess.txt does not refer to a page or folder in this web. It may be a page or folder in a subweb or a badly formed url" and it won't upload.

topr8

2:26 pm on Oct 18, 2005 (gmt 0)

WebmasterWorld Senior Member topr8 is a WebmasterWorld Top Contributor of All Time 10+ Year Member



i'm pretty sure that the cname change is not what you are looking for in this instance, it WILL direct non-www to the www page but not by giving a 301 permanant redirect back to the requester. it will just serve the www page

topr8

2:28 pm on Oct 18, 2005 (gmt 0)

WebmasterWorld Senior Member topr8 is a WebmasterWorld Top Contributor of All Time 10+ Year Member



>> .htaccess.txt

no no no!

just .htaccess ... no filename just an extention, i know that sounds weird

topr8

2:29 pm on Oct 18, 2005 (gmt 0)

WebmasterWorld Senior Member topr8 is a WebmasterWorld Top Contributor of All Time 10+ Year Member



how are you uploading the site files, just by ftp?

texasville

2:30 pm on Oct 18, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



no. using frontpage. How do I create a file without an extension? Notepad automatically refers to it as a .txt

topr8

2:34 pm on Oct 18, 2005 (gmt 0)

WebmasterWorld Senior Member topr8 is a WebmasterWorld Top Contributor of All Time 10+ Year Member



in notepad

save as>> save as type : all files

then just call it .htaccess

i'm sorry i've never used front page so don't know how you would upload it

topr8

2:35 pm on Oct 18, 2005 (gmt 0)

WebmasterWorld Senior Member topr8 is a WebmasterWorld Top Contributor of All Time 10+ Year Member



>>How do I create a file without an extension?

not without an extension :) :)

without a name!

texasville

2:40 pm on Oct 18, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



okay. got it saved where the icon looks the same as a css file. tried to upload (it's just drag and drop with frontpage) and it gave me the same message as before. won't upload the file.

Longhaired Genius

3:01 pm on Oct 18, 2005 (gmt 0)

10+ Year Member



This is a fascinating thread, makes me grateful for all Webmaster World has taught me.

Texasville, try uploading the file with a proper ftp client. Filezilla is supposed to be a good one for windows.

Topr8, htaccess is the filename, it is not an extension. .htaccess is a unix "dot file" [catb.org] or hidden file, ie, it is not usually visible in a directory view.

To save a "dot file" on a Microsoft Windows system, save it in quotes, like this: ".htaccess" and a spurious file extension will not be added.

[edited by: Longhaired_Genius at 3:08 pm (utc) on Oct. 18, 2005]

kevinpate

3:03 pm on Oct 18, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



If you can change the name of files in your friend's area, you might try uploading the text file as:
htaccess.txt (no dot on the front end)
and then, changing that file name to .htaccess once it is over on the server in your friend's area.

I don't know for certain if this will work, but what's currently happening isn't working, so maybe it's worth a shot. If it doesn't work, delete the file of course.

If it were me, I'd just grab a new host. Might be cheaper than the time invested.

kaled

3:37 pm on Oct 18, 2005 (gmt 0)

WebmasterWorld Senior Member kaled is a WebmasterWorld Top Contributor of All Time 10+ Year Member



texaville,

However you save the file, just ensure it is plain text. You can rename it later. To ftp it, you can use IE (type in ftp://domain.com) and drag the file to upload it. The only problem with this is that it only works in binary mode rather than ascii mode.

Kaled.

PS
I've made similar mistakes trying to help friends. Things go wrong that are almost unimaginable sometimes.

tosspot17

3:47 pm on Oct 18, 2005 (gmt 0)

10+ Year Member



If you can change the name of files in your friend's area, you might try uploading the text file as:
htaccess.txt (no dot on the front end)
and then, changing that file name to .htaccess once it is over on the server in your friend's area.

There's a good chance that will work - I've had to do the same thing recently on my hosting account.

just upload the file to ftp and then change the name.

topr8

3:55 pm on Oct 18, 2005 (gmt 0)

WebmasterWorld Senior Member topr8 is a WebmasterWorld Top Contributor of All Time 10+ Year Member



ah well you learn something every day

texasville

4:11 pm on Oct 18, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



nope. that doesn't work. it just reverts to the original name. I guess I will go to their control panel and try the ftp upload. However, I think there are more problems than this. Frontpage shouldn't be a problem.

kaled

5:25 pm on Oct 18, 2005 (gmt 0)

WebmasterWorld Senior Member kaled is a WebmasterWorld Top Contributor of All Time 10+ Year Member



You may be able to use your control panel to create and/or edit text files. Plesk allows this I think. I vaguely recall using it once.

Kaled.

texasville

6:16 pm on Oct 18, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Well, I got an ftp client and managed to get .htaccess to upload and installed. Unfortunately, the site now 404's.? No site at all.

Here is the code I used which I obtained from ww forums.
RewriteEngine on
RewriteCond %{HTTP_HOST} .
RewriteCond %{HTTP_HOST}!^www\.thissite\.com
RewriteRule (.*) [thissite.com...] [R=301,L]

texasville

6:18 pm on Oct 18, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



oops that is a 500 code

kevinpate

6:25 pm on Oct 18, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



ok, first off, kill the file to make the 500 error go away

kevinpate

6:29 pm on Oct 18, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Now, instead of what you used, try this instead:

RewriteEngine on
RewriteCond %{HTTP_HOST}!^www.realname.com [NC]
RewriteRule ^(.*)$ [realname.com...] [R,L]

texasville

6:47 pm on Oct 18, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



unfortunately, I cannot find the .htaccess file I uploaded now.

kaled

6:52 pm on Oct 18, 2005 (gmt 0)

WebmasterWorld Senior Member kaled is a WebmasterWorld Top Contributor of All Time 10+ Year Member



If the .htaccess file is invisible simply upload a blank file.

Kaled.

texasville

6:57 pm on Oct 18, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



okay! got the site back. Uploaded the blank one. Before I go further- I am uploading to mysite/htdocs/ because that is where the host said to upload all files. right?
This 59 message thread spans 2 pages: 59
 

Featured Threads

Hot Threads This Week

Hot Threads This Month