February 26, 2008

Avoiding Duplicate Content on Index/Home Page





A you might know, or not know, www.site.com, www.site.com/index.php, site.com and site.com/index.php are 4 different pages for search engines, although you see the same page.

To avoid the problem with duplicate content you have to have: Apache server running and mod_rewrite module installed. Now, somewhere in your .htaccess file include this code:

Options +FollowSymlinks -Indexes
RewriteEngine On

[read more...]

February 21, 2008

YouTube and Google API in Help of Google optimization





We all know that some of the most visited sites are those offering free video clips. The good news is that many of them allow their content to be shown on other sites. YouTube is not an exclusion. The average user likes sites containing different types of media and webmasters like much more using free content. In this article we want tell you how to implement a video clip in your site using the code given by YouTube. We will tell you how to implement many clips relevant to your content.

Every child knows that Mountain View guys offer free widgets and one of them is Google API for searching multimedia, part of the results are provided by YouTube. You don’t have to be a software engineer to use the code. The page that offer the code wee need is Video Bar Wizard:
[read more...]

February 20, 2008

Yahoo sitemap PHP script

Although Yahoo is used as search engine much less than Google, it should not be omitted. Unlike the Google sitemap, where we created xml file, in this case we create a simple text file with list of all indexed-to-be URLs. (This file could be used instead of the regular Google sitemap but NOT recommended).

Now, open your favorite text editor and paste the bolded code bellow:

<?

// Connecting, selecting database
$link = mysql_connect(’localhost’, ‘db_username’, ‘db_pass’)
//db_username is the database username; db_pass is the database password
or die(’Could not connect: ‘ . mysql_error());
mysql_select_db(’data_base_name’) or die(’Could not select database’);
//data_base_name is the DB you connect to

// Performing SQL query
$query = ‘SELECT item_id FROM db_table_name WHERE some_condition=1′;
$result = mysql_query($query) or die(’Query failed: ‘ . mysql_error());

[read more...]

Google sitemap PHP script

This is probably the simplest PHP script for creating Google sitemaps. Of course you should make some tweaks to make it run. First, change the username name and passoword for the MySQL DB. If you use a hosting company like godaddy, for example, you will have to change localhost also. Something like pXXmysqlYY.secureserver.net.

Second change concerns URLs, which is ih this type http://yoursite.com/url.php?id=XYZ.

If you still do not understand what to do, you will have to attend some progamming lessons.

And now, the script:

<?

// Connecting, selecting database
$link = mysql_connect(’localhost’, ‘db_username’, ‘db_pass’)
//db_username is the database username; db_pass is the database password
or die(’Could not connect: ‘ . mysql_error());
mysql_select_db(’data_base_name’) or die(’Could not select database’);
//data_base_name is the DB you connect to

// Performing SQL query
$query = ‘SELECT item_id FROM db_table_name WHERE some_condition=1′;
$result = mysql_query($query) or die(’Query failed: ‘ . mysql_error());

[read more...]