Wednesday, November 29, 2006

Your Custom Search Engine

It's easy to build a CSE -- no Ph.D. in computer science required. Here's how it works:
  1. Visit http://www.google.com/coop/cse/ and select the websites you'd like to include in your search index.
  2. Then choose to restrict search results to include only those pages and sites, or you can give those pages and sites higher priority and ranking within the larger Google index when people search on your search engine.
  3. From the CSE site, you can generate the code to place on your site and make the search engine, through an IFRAME, look and feel like your own. If you choose, you can easily link to your current AdSense account so you have a centralized place to manage your Google AdSense relationships.
  4. Last but certainly not least, you can invite members of your community to contribute to your search engine index, in real time. Simply enter email addresses of people you'd like to contribute and an invitation along with Google Marker will be sent to your invitees.

You can check out a few more CSEs in action by visiting our featured examples page. You'll see some created by industry experts, bloggers, educators and techies. We're continuing to add customization and advanced features to the CSE too. We hope you'll try it out and let us know what you think.

Get more information

Can't find what you're looking for? Try Google Search!
Google
 
Web eshwar123.blogspot.com

Monday, November 27, 2006

Working with .htaccess files

.htaccess files provides us with ways to make configuration changes on a per-directory basis. This file works well in Apache Web Server and on Linux/Unix. Also, it works on Windows based system with Apache Web server.

There are several things that developers, site owners and webmasters can do by using .htaccess file. Let’s look at some of them:

  • Prevent directory browsing
  • Redirect visitors from one page or directory to another
  • Password protection for directories
  • Change the default index page of a directory
  • Prevent hot-linking of images from your website

Since .htaccess file allows us to make changes on a per-directory basis, the following are valid places to put the .htaccess file in:

/.htaccess [placing in root folder of the site]
/content/.htaccess [placing in content folder]
/content/html/images/.htaccess [in the images folder]

:idea: Any command that you place in .htaccess file will affect it’s current directory where it is placed and also it’s sub-directories. You may put a .htaccess file in the root folder such that it will affect the whole site.

:idea: Make a backup of your .htaccess file [if you have any] before you attempt any of the settings mentioned in this article. I must not be held responsible for any consequences that arises due to editing your .htaccess file. ;)

Working with .htaccess files

For creating and editing purpose, a normal text editor such as notepad will do. Alternatively, you can download a free copy of PSPad for easy editing. To be able to see files in your FTP software, you must enable settings in your FTP client to see hidden files on the remote server [applicable to your system as well]. When done editing, you can save the file with double quotes in windows. [Save file as “.htaccess”]. This will save the file as .htaccess and will not prompt you for a file name as such. I think you have quite understood these instructions. Let’s move on to some common examples and usages of .htaccess file.

Allow/Deny Directory browsing

With directory browsing on, people when open a URL from your site with no index page or no pages at all, will see all it’s files and folders. To prevent such directory viewing, just place the following line in your .htaccess file.

IndexIgnore */*

Many hosting companies, by default deny directory browsing and having said that, just in case you need to enable directory browsing, place the following line in your .htaccess file.

Options +Indexes

Redirect visitors from one page or directory to another

It’s quite simple. Look at the example lines below and place similar lines in your .htaccess file of the root folder and it will do the rest. [Remember to use permanent keyword in the line to tell the search engines that the old link has moved to the new link]
Syntax: Redirect permanent [old directory or file name][space][new directory or file name]

Redirect permanent /olddirectory /newdirectory
Redirect permanent /olddirectory /somedirectory/newdirectory
Redirect permanent /oldhtmlfile.htm /newhtmlfile.htm
Redirect permanent /oldhtmlfile.htm http://your-domain.com/newhtmlfile.htm

All the above lines are valid. Just remember to replace the file/directory names with actual ones.

Change the default index page of a directory or site

Almost every hosting company will have index.htm, index.html, index.php, index.asp, default.asp, default.html as the default index page names in their web server settings. So, in case your site or directory does not has a file name which matches a name from the list above, chances are that your visitors will either see a list of all the files and folders [through directory browsing] or will not see anything at all. To change the default index page’s name for a directory or the site, place the following line in the .htaccess file of the root folder or the particular directory for which you want to change the index page’s name.

DirectoryIndex homepage.htm
DirectoryIndex somepage.htm

To have more names, put a space between file names and it will take into considerations all those file names as possible index page names. Which means, if it finds a filename matching a list of names you supplied [in the given order] in .htaccess, then it will open that page as the index page for the directory. The below line, with multiple names, is also a valid usage:

DirectoryIndex homapage.html somepage.html myindexpage.html anything.html

:idea: Remember, each entry must be in one line only.

Prevening hot-linking of images from your website

If your website contains images which people from other websites are linking to and you get charged for the extra bandwidth, then placing the following lines will prevent any such image hot-linking. Most of the hosting companies provide this feature in their control panel itself, such as CPanel. This trick requires mod_rewrite engine to be on in Apache on your web server.

RewriteEngine on
RewriteCond %{HTTP_REFERER} !^$
RewriteCond %{HTTP_REFERER} !^http://(www.)?your-domain.com/.*$ [NC]
RewriteRule .(gif|jpg)$ - [F]

In the above code, replace [your-domain] with your actual domain name [without www]

Prevent access to your .htaccess file

This article would have remained incomplete without mentioning this trick. ;) To prevent visitors from viewing your .htaccess file, place the following lines in your file.

<Files .htaccess>
order allow,deny
deny from all
</Files>

More information and detailed documentation, visit Apache website.

Get more information

Can't find what you're looking for? Try Google Search!
Google
 
Web eshwar123.blogspot.com

Free online virus scanners which run inside web browser

he computer security market is flooded with antivirus software that work but don't come cheap.

While viruses remain a threat to our precious data, you need not necessarily invest in expensive antivirus scanners - there are plenty of free options available that may give even some commercial vendors a run for their money.

We look at some of the best software available today for keeping your computer free of viruses and other malware. Later we help you decide the one most suitable for you.

Free Online Virus Scanners [run inside the web browser to scan your hard drive]

Trend Micro HouseCall - An online virus scanner that's absolutely free and scans your PC hard drive for any sort of viruses or even spyware. HouseCall allows you to remove detected infections. Works with Firefox and IE. Requires Java.

McAfee Freescan - This free virus scanner from McAfee is based on the McAfee VirusScan engine. Should viruses be found, FreeScan prepares a list of infected files and links to information about the viruses on your computer. It also gives you an option to clean your system. Requires IE with ActiveX.

Windows Live OneCare Scanner - A free antivirus online scanner from Microsoft that cleans your system from viruses and also recommends ways to improve the overall performance. Part of Windows Onecare.

Symantec Internet Security - An online virus scanner from the developers of Norton Antivirus 2007 can detect most virus threat but there is no option to delete the virus infected file or repair it. Does not examine compressed files. Requires IE with ActiveX.

BitDefender Online Scanner - Their Free Online Virus Scanner version 8 scans your system's memory, all files, folders and drives' boot sectors - the default options automatically cleans the infected files. Requires IE with ActiveX.

Free Anti Virus Software for Windows [Requires Installation]

Avast! Home Edition - One of the most popular antivirus software, can also be run from Explorer context menu. You can either scan the entire hard drive or selected folders. Ships with an Antivirus screen-saver.

AOL Active Virus - a free virus scanner from AOL based on Kaspersky Antivirus that doesn't require an AOL account to download the software. The software can be configure to check only new and modified files thereby reducing the memory requirements. Also support scanning of incoming and outgoing email messages.

ClamWin Virus Scanner - An opensource antivirus software that is great for running routine antivirus checks on your PC. You need to manually scan a file in order to detect a virus or spyware.

AVG 7.5 Free Antivirus - One of most popular free virus scanning software is AVG 7.5 Free Edition (read comments). Initially, there was confusion whether AVG 7.5 would be free like AVG 7.1 but the good news is that AVG 7.5 Free edition is already available for non-commercial, single home computer use.

Conclusion: Which one should I choose ?

Unlike Desktop antivirus software, online virus scanners do not proactively protect your PC against new virus infections.

But if viruses have already entered your hard drive and taken control of your existing desktop scanner program, any of the above listed online virus-scanning services can save your day.

If you are a fairly experienced web user who doesn't need an antivirus software to run in the background 24 hours, scan you drive at regular intervals using HouseCall. Others may install the AOL antivirus software which uses the Kaspersky virus definitions database.

Get more information

Can't find what you're looking for? Try Google Search!
Google
 
Web eshwar123.blogspot.com