homepage Welcome to WebmasterWorld Guest from 54.196.168.78
register, free tools, login, search, subscribe, help, library, announcements, recent posts, open posts,
Pubcon Platinum Sponsor 2014
Visit PubCon.com
Home / Forums Index / WebmasterWorld / Webmaster General
Forum Library, Charter, Moderators: phranque & physics

Webmaster General Forum

This 59 message thread spans 2 pages: 59 ( [1] 2 > >     
Host says no 301 redirect in htaccess
new site, new host, no 301's
texasville




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

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




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

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




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

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




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

>>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




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

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




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

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




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

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




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

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




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

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




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

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




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

>> .htaccess.txt

no no no!

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

topr8




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

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

texasville




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

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

topr8




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

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




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

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

not without an extension :) :)

without a name!

texasville




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

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




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

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




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

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




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

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




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

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




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

ah well you learn something every day

texasville




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

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




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

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




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

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




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

oops that is a 500 code

kevinpate




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

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

kevinpate




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

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

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

texasville




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

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

kaled




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

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

Kaled.

texasville




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

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 ( [1] 2 > >
Global Options:
 top home search open messages active posts  
 

Home / Forums Index / WebmasterWorld / Webmaster General
rss feed

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Home ¦ Free Tools ¦ Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About ¦ Library ¦ Newsletter
WebmasterWorld is a Developer Shed Community owned by Jim Boykin.
© Webmaster World 1996-2014 all rights reserved