As you can see, the main forum and topic pages on this site display Google Ads. These text-based ads spider the site they're on and display relevant links targeted to the content of the current page. This works perfectly for a page such as

However, recently to increase search engine placement (as search engines far prefer static pages to dynamic pages) I used mod_rewrite in the .htaccess file to make the .php files appear as if they're static .html files. (Information about mod_rewrite can be found here: http://httpd.apache.org/docs/mod/mod_rewrite.html )

Now here's the problem. When using the real URLs such as http://www.techtalkforums.com/forums/viewforum.php?f=1 the Google ads displayed are entirely relevant. For example, if you're in the Windows forum, it'll display Microsoft info, Linux forum displays Linux links, etc etc.

However, when using the html aliases, all of the ads displayed on every page are related to general computing. They're the same ads that are usually displayed on the index.php (index.html) and forum.php (forum.html) pages.

It's not like the google ads can't recognize the HTML pages at all, because then the ads wouldn't be relevant at all. But instead, they're relevant but to my index/forum homepages. The only code related to these HTML pages is in the .htaccess file displayed above. Can anyone spot any code in there that might be a reason for this?

I earn money for each click to the Google ads, and I would hate to lose so much money only because relevant ads aren't being displayed when they should.

TIA!

P.S. The reason that some of the lines of the .htaccess file are hashed out (commented out) is because those deal with Site IDs, which I prefer not to incorporate into the URLs on TechTalk Forums, although the default IS to include them on the phpBB forum software (that is used here). Any ideas would be greatly appreciated!

One more thing that might help in solving this dilemma. The two lines which are commented out ...

... actually produce a very undesired effect when uncommented. They prevent access to the search.php page! Even though none of the code is related to search.php in any way, trying to access search.php when these lines aren't commented will always redirect you back to the main index page regardless of where you are.

Perhaps if those could redirect you to the index page, then other lines I don't have commented can redirect googlebot (google's spider) to the index page? (and therefore reading the index page's meta tags and content instead of the appropriate page's).

It seems as if the google ads are always pulling from the default homepage instead of the current page. Of course, this doesn't happen when directly accessing .php files. Only when accessing their .html counterparts.

This is so frustrating. I can't decide which is more important! Making money by displaying relevant ads. Or hopefully increasing my search engine popularity via static pages!! :)