Forum Moderators: open
The server processes the include when a bot or browser requests the file. As a result neither browser nor bot see the inlcude command as you put it in the source code. Both see just the result of the command.
To illustrate: Call the page with your browser and then choose "view source" of the page. What you get then is what any spider gets.
Someone else just posted about having a problem with pages with id=123 not being indexed. That might make it appear to be an affiliate code, maybe custom landing pages that would mean a lot of duplication.
Some dynamic pages are being indexed, it might be the id= part that's the problem. Do a site search for mod_rewrite.
Since you only use one variable, you will be fine with Google crawling your site. Google will crawl dynamic links with up to 2 variables. However other SE's will not.
If you don't have a .htaccess file you will need to create one. Notice this is for example purposes and may need some customization on your part. The code below should be added to your .htaccess file.
RewriteEngine On
RewriteRule ^info-(.*).htm /show_info.php?id=$1 [L]
Now call all your pages like info-1.htm. The server will take the number after the "-" and pass that to the $1 variable in the show_info.php?id=$1 statement.
Completely transparent, it works like virtual .htm pages. Visitors and SE spiders view as a true static htm page, however it is dynamically created on the server backend.
If you have any questions just drop me a line, I would be glad to help. It took me less than a day to convert my entire site using this method.
Derek
Widget1-info-1.html
Widget2-info-1.html
Both of the above will show the same content and will be seen as duplicates. That is assuming your are using the .htaccess I posted above.
If you modified your show-info.php script to accept more variables then you can have some real fun and do what I think you want to do.
Lets say you modified your code a bit to accept an additional variable, and in your php code you use that variable and place it in the title, and in the main <H1> or similar tag of your pages, then you will see a benifit.
Example
RewriteEngine On
RewriteRule ^(.*)-info-(.*).html /show_info.php?keyword=$1&id=$2 [L]
Now assuming your php is modified and accepts the second variable.
Example : widget1-id-1234.html
That .htaccess willl take widget1 and place that in variable $1, and also place 1234 in variable $2 place.
You could use that to make your php script use variable "keyword" and place that in your title of your dynamically generated pages. That way each page is somewhat unique. You could take this even further, depending on how many variables you want to pass.
Derek