Forum Moderators: phranque

Message Too Old, No Replies

.htaccess for dummies?

.htaccess tips

         

spohome

10:22 pm on Jan 16, 2006 (gmt 0)

10+ Year Member



Ok, I have a 3 month old site that has a pr 3 and climbing fast. I am new to the webmaster world (not jus tthe forum). My site gets about 900 uniques a month and 100 SE hits a month. And I don't have a .htaccess for my site.

My question is...what is it exactly? and how can I use it to make my site better?

Stefan

4:02 am on Jan 17, 2006 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Welcome to WW, spohome.

I'm not the person to be advising on htaccess, but if you know nothing about it, I'm a step ahead of you ;-)

.htaccess is used by Apache servers and gives a great amount of control over what the server does when it gets certain requests. You can redirect from one requested URL to another, serve different pages depending on the referer, ban IP#'s, and do a whole heap of handy things. There's a lot of info online about it, and also lots to be learned in forum 92 (here). jd (Jim), the mod for this forum, is the resident expert (and he really is), but don't ask too much of him - if you do, he'll just direct you to good resource material :-) Do some searches, read up, learn some of the syntax and methods, and read the posts in this forum.

spohome

4:08 am on Jan 17, 2006 (gmt 0)

10+ Year Member



Thanks Stefan, how would I know if my server was apache? My host is hostgator

Stefan

4:23 am on Jan 17, 2006 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



This header checker tool will tell you

[webmasterworld.com...]

Click that, enter your URL, and if you're on Apache you should see something like this:

Server: Apache/1.3.27 (Unix) (Red-Hat/Linux) PHP/4.3.0

spohome

4:34 am on Jan 17, 2006 (gmt 0)

10+ Year Member



ok it is thanks

Can I use .htaccess to make my site more search engine friendly?

Stefan

4:39 am on Jan 17, 2006 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Well, you can at least take care of a potential canonical problem, which is not SE friendly. You can force all requests to either the root domain "example.com", or the subdomain "www.example.com". That can prevent problems.

When you change file-names for pages, you can easily redirect them.

Probably other things, too, but that's all I can think of off-hand.