.htaccess file

Associate
Joined
19 Feb 2009
Posts
338
Hi,

I am using a .htaccess file at present which does just two things: redirects my 404 page and redirects the non www domain to www so we dont get any duplicate content issues. But, I know there is way more I could do to improve things.

One simple thing is to stop people accessing directories directly. The other is to turn off the need for file extensions - .php .html etc.

So, what else could I do that would improve the website or the user experience by writing a good .htaccess file. What do you put in your files? Any code examples would also be really handy as it is something I haven't really looked at in detail before.

Should also say I am running a Linux box.

Many thanks.
 
Lookup mod_rewrite - it's very powerful.

Some of the things you mentioned I do in the Vhost config.
 
Back
Top Bottom