Archive for the 'Linux' Category

How to create an .htaccess file

The .htaccess file is a very powerful tool - amongst other things, it allows you to password protect folders, redirect users automatically, use custom error pages, change your file extensions, ban users by IP address, only allow users with certain IP addresses, stop directory listings and use an alternate index file.

Creating the file is easy, you just need enter the appropriate code into a text editor (like notepad). You may run into problems with saving the file because .htaccess is a strange file name (the file actually has no name but a 8 letter file extension). You may need to name it something else (e.g. htaccess.txt) and then upload it to the server using an ftp client program (.htaccess files must be uploaded in ASCII mode, not BINARY). Once you have uploaded the file you can then rename it using your FTP program.

You may need to CHMOD the htaccess file to 644 or (RW-R–R–). This makes the file usable by the server, but prevents it from being read by a browser, which could seriously compromise your security.

For more information on .htaccess files see the Comprehensive guide to .htaccess.

In my next post I’ll be going through some cool things you can do with the .htaccess file

Open Source OS fun!

Today I was doing my good deed for the lifetime - a friend told me he needed a PC and as I had an old one gathering dust at home, I told him I’d let him have it - so far so good.

However, I didn’t have an OS for it so I thought - why not install a free Open Source OS? Well, I had a copy of Red Hat 9 on 3 CDs so I installed it and the installation completed with no errors. However, when the PC started up and I tried to connect to Red Hat Network to update the PC, it threw up the error “problem registering username”.

A search of Google Groups came up with the solution:
“You need to download and install both up2date-3.1.23.2-1.i386.rpm and up2date-gnome-3.1.23.2-1.i386.rpm packages. As root from the console or xterm session type something like;

rpm -Uvh ftp://updates.redhat.com/9/en/os/i386/up2*-3.1.23.2-1.i386.rpm”

I opened a Terminal window - typed in the above, connected to the Red Hat Network and downloaded my updates. So, if you hit the same problem - you know what to do!

Now, I’m going to try Suse Linux 9.1 on the PC as well - just to see if it is any more user-friendly! I’ll let you know how I get on.




Tom Raftery’s Social Media is Digg proof thanks to caching by WP Super Cache!