Setting up Wordpress on Hostgator

Myler

the horror.
Apr 25, 2009
531
6
0
G16
So I bought a shared hosting package on HG and tried to transfer my blog from local to the server, but it didn't work right, and since it isn't anything big, I decided to install the blog clean via Fantastico and start from scratch.

Now, I have few questions


1) I can't find the htaccess file. All I want to do is to make the damn address show the "www" everytime, because now it takes away www from the address bar on my site.

I found a piece of code that supposedly does that;

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

Question is;

- is it enough just to save the above code in notepad as .htaccess and just upload it?


And question #2 which is also tied to the question above...

I have 2 folders in my root that have the blog files


public_html and www


Which one should I use for uploading stuff to my blog etc?


Thanks for the help guys
 


I made a htaccess file from the code above, replaced the domain name of course, and uploaded it in the "www" folder

Now the browser tells me this

vpvo0y.jpg
 
Regarding your second question, I don't really think it matters. I throw everything inside public_html, but either will work.
 
I'm using Filezilla...

I found the "Force showing hidden files" option, and now I see the htaccess file in the "etc" directory

And it only has one line in it

"Options All -Indexes"

There's only one htaccess file that applies to the whole site, right?
 
write in a text file (use notepad)

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

Upload this text file, and the rewrite to .htaccess

DONE.
 
Nope, I got htaccess in etc folder, mail folder, public ftp folder, but nothing in publich_html or www


Is it good if I turned off indexing on every folder except public html and www ?
 
I put the modified htaccess file in the public html folder and it gives me that same error I posted the picture from
 
Not at the root of public_html, the root of the domain you are working on. If you haven't added on any domains yet, and only have the 1 you initially setup, I think this folder is called "home", but I could be wrong. So public_html/home should be where the WP install went .

It sounds like you overwrote something else though, that you shouldn't have...so I'm really not sure.
 
I bought the domain but the blog will be the first thing on it, so www - website - com will get you right on the first page of the blog


Anyway, in the public_html and www folders I don't see anything but the regular WP folders...no "home" or anything similar


Sheesh....and I thought that it would be a smooth install hehe
 
In HG it will be under the root of"public html."

If you used fantastico to install, you will NOT have an htaccess unless you manually create one or have updated permalink structure.

Delete the one you created, go change permalink structure to something custom, and refresh ftp. This way, you will be certain where it should be placed by seeing it done for you the first time.