Forum Moderators: open

Message Too Old, No Replies

Will a bot consider .shtml as static content?

.shtml==html, right?

         

iProgram

2:27 pm on Feb 2, 2003 (gmt 0)

10+ Year Member



I think .shtml==.htm right?
The bot will consider the "<-- include" part as a comment, right?

heini

2:37 pm on Feb 2, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Welcome to WebmasterWorld

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.

iProgram

3:02 pm on Feb 2, 2003 (gmt 0)

10+ Year Member



I see.
One of my web site has a PR 7 but most of its page are generated by php+mySQL, such as show_info.php?id=123 , show_info.php?id=456. According to gg webmaster info page, the bot does not index them :(
So I want to convert them into static pages: info-123.htm, info-456.htm... (Using a program of cause) It will be a good news if the bot considers shtml file as html.

heini

3:24 pm on Feb 2, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Sounds like a sound strategy, though dynamic content gets indexed. Static content is still the safer bet.

As to the server side includes: if you inlude dynamically created stuff, like a date, then as a result the bot gets fresh pages on every hit.

Marcia

3:34 pm on Feb 2, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



>>show_info.php?id=123

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.

DerekT

8:55 pm on Feb 2, 2003 (gmt 0)

10+ Year Member



I currently have a site with over 15,000 pages all generated dynamicaly with php and MySql. I use a .htaccess modification to make my pages appear .html but are really rewritten on the server side.

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

iProgram

2:53 am on Feb 3, 2003 (gmt 0)

10+ Year Member



Thank you so much. Is it possible to change *-info-123.html into show-info.php?id=123?
For example:
keyword1_keyword2-info-123.html-> show-info.php?id=123
blabla-info-456.html -> show-info.php?id=456

DerekT

3:06 am on Feb 3, 2003 (gmt 0)

10+ Year Member



Yes you could do that, however I would not recommend it. Considering each url that has the same number in it would be seen a copy, even with different keyword names.

keyword-info-123.html & keyword2-info-123.html would display the same content.

Derek

iProgram

3:26 am on Feb 3, 2003 (gmt 0)

10+ Year Member



I think the keyword in filename will help google ranking, isn't it?

DerekT

3:40 am on Feb 3, 2003 (gmt 0)

10+ Year Member



Well if you have no new content on each of the pages then no.

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

iProgram

5:18 am on Feb 3, 2003 (gmt 0)

10+ Year Member



Thanks but when I pasted these codes in my .htaccess file I always received a 404 Forbidden error:
==========.htaccess============
ErrorDocument 404 /404.html
RewriteEngine On
RewriteRule ^(.*)-info-(.*).html /show_info.php?keyword=$1&id=$2 [L]
=========end===================
The old file has "ErrorDocument 404 /404.html" only and it works well.

DerekT

8:38 pm on Feb 3, 2003 (gmt 0)

10+ Year Member



Have you edited your php script to accept the keyword variable?

iProgram

2:32 pm on Feb 4, 2003 (gmt 0)

10+ Year Member



Thank you Derek. It is the problem of my web hosting. It is ok now, because I brought a new hosting this morning.