Forum Moderators: phranque
>>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]
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.
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.
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, 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]
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.
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.
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.
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]
RewriteEngine on
RewriteCond %{HTTP_HOST}!^www.realname.com [NC]
RewriteRule ^(.*)$ [realname.com...] [R,L]