GoogleTap / Google Tap Apache and IIS
Date: Tuesday, May 25 @ 09:18:31 CEST
Topic: PHP-Nuke


GoogleTap FAQ Apache & IIS

Just what is this amazing unknown beast?

Googletap is an application add-on to PHP-Nuke written by Zhen-Xjell (Paul Laudanski) to accomplish two goals:

1) Shorten PHP-Nuke's long URLs,
2) Open up PHP-Nuke to Search Engines for Crawling.

The technology involved in such an architecture involves the PHP language and Apache mod_rewrite code. Both make use of regular expressions (REGEX).

There are multiple components to Googletap's installation. The first involves header.php:

Installation of a single function into the header.php file makes use of two arrays and an internal PHP replace routine. As the header.php file is called on each PHP-Nuke page load, this Googletap function is used by Apache's mod_php engine to search and replace all matching criteria.

As your web server calls PHP to process the script, this is where all your search and replace executions take place. Once complete, your web server sends the modified PHP-Nuke page to your web browser. You now see the short URL list that was matched.

The second portion makes use of the footer.php file which integrates in with the above. As the header.php file is used to start the match/replace sequence, so is the footer.php file used to end it. In between PHP takes a 'cache' of the entire code and then runs the replacement routine which is then fed to your browser.

The final piece to this puzzle is the web browser rewrite code. In the instance of Apache, this can be done via httpd.conf or .htaccess. Usage in httpd.conf is different than the standard .htaccess code. Since httpd.conf is used first, running the rewrite codes from there is faster than storing them in .htaccess.

Why run this third portion? Because when you send the shorter abbreviated URL to your web browser, it will look for the link as an actual filename. It won't find it and will return an error (typically a 404).

This is where the rewrite comes in very handy. You tell your web server to watch for the shorter URLs, and then behind the scenes translate them into the correct long PHP-Nuke URLs which the browser will be able to process correctly then. All this happens transparently to the user browsing your site, but it does add some overhead to your servers CPU.

The final component is modifying your forums sessions.php file. Search engines key into URLs that have "&SID" in them and typically do not crawl such pages. Where in PHP-Nuke does this occur? The forums and the news articles. Sessions.php alterations removes the "&SID" from showing to any search engines, but keeps them for all regular users. This allows search engines to deep crawl your forums because the &SID, or "per session cookie ID" is not displayed. Why do search engines need a cookie right?

Well the news articles no longer show the &SID due to the search and replace routine found in the header.php file.

So why use .htaccess and not httpd.conf?

Most folks do not have access to the Apache configuration file, but they are allowed to create and use their own .htaccess. Its simpler and easier to control. I have personally worked on httpd.conf Googletap code in the past, and certainly some modifications need to occur, but I just never made the time to do this. Perhaps it will be the next generation evolution of Googletap.

Other Googletap-like applications have sprung to life like Imago's Googlifier and Audioslaved's GT-NExtGEn. Both approach this same concept in their own unique way and serve their audience just as successfully.

Googletap itself can be downloaded from our CVS which unfortunately has been disabled by JaguarPC our current website. We are looking into this. In the meantime, you can grab the files directly:

header.php
footer.php
.htaccess

What are the benefits of running Googletap?

Your website will be deep crawled for all the vast content you have that was until now unreachable by the rest of the world. Googletap has revitalized PHP-Nuke accessibility and reach.

If you haven't been Googletap'd yet, then feel free to drop by our Googletap forum to rise to a new level of dynamic content visibility.

Addendum

One of the most important but unstated requirements of GoogleTap is the use of mod_rewrite for Apache, so long as you are using Apache.

You need to ensure mod_rewrite is built into the Apache configuration and activated in your .htaccess thus:

RewriteEngine on

The .htaccess file will only be honored if within your httpd.conf file it is granted to operate:

AllowOverride All

IIS Server GoogleTap

This section is thanks to NeXeH from RPG World for porting over GoogleTap from Apache to Microsoft's IIS Web Server, and I quote:

Tools needed:
ISAPI_Rewrite lite, you can download from: http://www.isapirewrite.com/download/
http.ini file you can download it from here: http://rpgworld.ath.cx/downloads-cat12.html

Installation:
1. Install Google tap/GT-NExtGEn as normal (I use GT-NExtGEn)
2. Install ISAPI_Rewrite on your server (or have your ISP do it)
3. Copy the provided http.ini file to the ISAPI_Rewrite directory which should be located at C:program filesHeliconISAPI_Rewrite
4. Open IIS server manager and locate your website
4a. Right click on properties
4b. Select ISAPI_Filters
4c. Click Add
4c1. In the filter name box type: ISAPI_Rewrite
4c2. in the executable box browse to the ISAPI_Rewrite.dll located in the ISAPI_Rewrite folder
4d. Click ok and then click ok again.
5. Close IIS and test


26 May 2004: More information was added to an Addendum.



This article comes from NukeCops
http://www.nukecops.com

The URL for this story is:
http://www.nukecops.com/modules.php?name=News&file=article&sid=2157