Forum Moderators: coopster

Message Too Old, No Replies

php and search engines

why doesn't this work

         

adwhite

11:42 pm on May 13, 2004 (gmt 0)

10+ Year Member



Hi,

I've got a site built around a few php programs, when the page is requested it uses htaccess to call a php program with the page name. This page name is used to extract title/description/keywords/h1/h2/alttext/copy etc from a database and then populate the page.
The site works well and I only have 2 or 3 programs to run a large site based on a database.
The problem is when I run it through the spider test on this site it doesn't pick up the title/description or keywords.
Is this something to do with the page being built on the fly, and if so does anyone have a solution to this?

Cheers

Andy

volatilegx

1:43 am on May 14, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



You may have a problem with your .htaccess. I assume you are using Mod_Rewrite to rewrite your URLs to grab the right PHP file and add some parameters to the URI?

Well, is it possible that you are using the wrong type of redirect, that instead of doing an invisible redirect is simply redirecting the client/spider?

adwhite

8:06 am on May 14, 2004 (gmt 0)

10+ Year Member



I'm using the following type of htaccess

RewriteEngine On
RewriteRule ^([a-zA-Z0-9_-]+)\.html$ bztoptemplate.php?page=$1 [L]

Which certainly does the job.

adwhite

4:54 pm on May 15, 2004 (gmt 0)

10+ Year Member



Solved it!

I had put :-
<meta name="description" content=<?PHP echo "\"$description\""?> />

By removing the space before the /> it has solved the problem and is now picking up the keywords and description tags.