For directory engine I use the free IndexScript. Finally, after many code hacking I really like it. About two weeks ago my site was completely reindexed because I changed the underlines to hypens in the URL stucture.

Many of you may think that a compound separated with underlines will be recognised by search engines. They won’t.

Before my last intervention the URL of my seo forum category was

http://www.directoryofseolinks.com/1/seo_forums/

and when I requested a searching query for the “seo forums” phrase using the allinurl: operator Google didn’t display any result. Now, using hypens my category names in the URLs are recognisable by the robots. How did I do that? Just follow the next few steps and hypens will substitute underlines, and one more search engine factor will be straightened out.


Eliminating underlines

Before executing the following code changes make sure that you created backup files and the selected value of the “SEO URLs Scheme” option in the admin board is 2.
For hacking I suggest you to use notepad.

  • 1. Step Open the index.php for editing and press control+H. Using the appearing input forms substitute this code:

    eregi_replace("[_]+", "_", str_replace(" ", "_", eregi_replace("[^_a-zA-Z0-9 ]", " ", $row['name']))) .

    with this one:

    eregi_replace("[-]+", "-", str_replace(" ", "-", eregi_replace("[^_a-zA-Z0-9 ]", " ", $row['name']))) .

    all around the file.

  • 2. Step Carry out the same process with the /include/utils.php, site_map.php, site_map_xml.php files.

  • 3. Step There is no 3. step, you are done!




Correcting the breadcrumb navigation link

After installing and adding a category into the directory we will see that in the breadcrumb above the listed websites, the index words points back to the main page referring to the /index.php file. This mistake will cause duplicated content and won’t make us very popular among search engines. So open the /include/utils.php file and substitute this code:

a href=\"" . $dir_root_path . "index.php\">Index

with this one

a href=\"/\">Index


Outbound links using the URL as anchor text?

Browsing among the categories you can see that the listed sites are linked not only with the suggested anchor text, but with their URL also. If I were I would correct this. Just open show_cat.php and latest.php files and substitute these codes:

  • a href=\"" . $row['url'] . "\" target=\"_blank\">" . $row['url'] . "

  • a href=\"" . $row['url'] . "\">" . $row['url'] . "

with this one:

" . $row['url'] . "



Eliminating content duplaction at the listing pages

With your current SEO URLs Scheme you will see the navigation links at the bottom of the pages as First, Prev, Next and Last. I have a suggestion to make this links perfect in order to eliminate all the content duplication possibilities.

  • With the above described method (using control+H) in the show_cat.php file substitute this code:

    "/1/\">First ”;
    if($page > 1) {


    with this one:

    "/\">First ”;
    if($page > 2) {

Executing this hack the yourdomain.com/your-category/ wont be duplicated with the yourdomain.com/your-category/1/page.

I hope you agree with me and think that your directory is much professional now! If you have any opinion let me know!