Forum Moderators: coopster

Message Too Old, No Replies

Search engines and PHP pages

Are dynamic pages penalised?

         

Scooter24

11:18 pm on Apr 12, 2004 (gmt 0)

10+ Year Member Top Contributors Of The Month



I recently made my site dynamic and changed the URLs from

www.mysite.com/foo/bar/imagehtm/image23.htm
to
www.mysite.com/foo/bar/img.php?pic=23

(where 23 is the picture number).

About an hour ago I ran into this article:
[zend.com...]

where basically the author says that dynamic pages with '?' in the URL are not spider friendly. I then searched webmasterworld and found conflicting opinions. Are dynamic pages with '?' in the URL indeed penalised?

Should I modify the URLs to something like

www.mysite.com/foo/bar/img.php/p23

using the $PATH_INFO environment variable? I only pass one parameter by the way.

Birdman

11:34 pm on Apr 12, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



One parameter should not hurt you at all. Now, session ids(or something that looks like one) are a different story...they can keep your pages from being indexed.

I did, however, choose to do away with query strings using Apache's mod_rewrite module. I just like a url to look totally static. Your example of using the PATH_INFO global will work too, but the url still looks a bit strange to me.

I would use URLs like www.mysite.com/foo/bar/img-23.php

And then use mod_rewrite to rewrite them to

www.mysite.com/foo/bar/img.php?pic=23

The spiders and users never see the rewrite and the original stays in the address bar.

WhosAWhata

1:36 am on Apr 13, 2004 (gmt 0)

10+ Year Member



something like...

RewriteEngine on
RewriteCond %{REQUEST_URI}% ^image(.*)\.htm$
RewriteRule image(.*).htm img.php?pic=$1

ergophobe

2:45 am on Apr 13, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month




but the url still looks a bit strange to me.

AFAIK a directory with a . in it is perfectly valid in a *nix environment, probably in Windows too, so I wouldn't think it would hurt you.

I think that the way Google chunks things up dir.ectory would be two words just like dir-ectory (but unlike dir_ectory).

jatar_k

2:49 am on Apr 13, 2004 (gmt 0)

WebmasterWorld Administrator 10+ Year Member



here's my view on it

get params used to mess up SE's
they have gotten much much better

do more params mess up spidering - definitely

if you keep it to less params will it get spidered more efficiently - yes

do you get spidered more effectively with out get params - yes

the thing is we don't care about spidering. At the end of the day the only thing that counts is being able to rank.

do pages with no params rank well in competetive markets - yes 100%

do pages with params rank well in competetive markets - depends

your choice

cut and dried - rewrite them or design software that doesn't need them, give yourself the best chance you can to rank well, stop worrying about spidering. SE's will spider straight url's all the time.

<added>they are not penalized but why make the spider have to work to get what you want it to have? Why serve the same page 1000's of times and hope the spider knows the difference?

WhosAWhata

9:17 pm on Apr 13, 2004 (gmt 0)

10+ Year Member



very good points,
in addition,
if you want a user friendly site, it makes much more sense to have a memorable url like:
www.site.com/images/23.htm

than a harder url to remember or type:
www.site.com/images.php?pic=23

either way

ergophobe

10:43 pm on Apr 13, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month




a memorable url like:
www.site.com/images/23.htm

I hope that's a joke.

jatar_k

11:05 pm on Apr 13, 2004 (gmt 0)

WebmasterWorld Administrator 10+ Year Member



lol, crackin me up ergophobe :)

good point WhosAWhata but maybe not the best example

www.site.com/dogpic.htm

might be a better example, people don't remember numbers well, no association, or too many, however you want to look at it.

words, names, etc related to the subject matter are the easiest for ppl to remember.

what was that site with the ....

funny dog picture
casserole recipe
link script
baby product

www.example.com/funnydog.html
www.example.com/casserole.html
www.example.com/linkscript.html
www.example.com/babyproduct.html

you get the drift

WhosAWhata

11:17 pm on Apr 13, 2004 (gmt 0)

10+ Year Member



it was a half hearted example
rofl
what i intended to say is that static urls are much easier to remember than get urls
personally i would be using site.com/picture.htm types like you suggested, but you have to admit that even
images/23.htm
is easier for most people than
images.php?pic=23

thats all i was trying to get across

ergophobe

12:12 am on Apr 14, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



Sorry, just havin' a little fun at your expense.

I wholeheartedly agree and have said the same thing until I'm sick of typing in the url for Tim Berners-Lee's "Cool URIs Don't Change" article.

That's why I like really like to use mod_rewrite to make mnemonic URIs with no file extensions like

www.site.com/articles/year/2003/month/may/aid/article17/pid/page4

Just kidding! Sorry guys, i haven't been getting enough sleep lately and this is what happens.

Tom

WhosAWhata

2:01 am on Apr 14, 2004 (gmt 0)

10+ Year Member



hey a little fun never hurts,
i made that one a little too easy though didn't i?
But yes, mnemonic URI's are the way to go

Scooter24

10:02 am on Apr 14, 2004 (gmt 0)

10+ Year Member Top Contributors Of The Month



Well, yesterday I changed the URLs from

www.site.com/gallery/img.php?pic=NN

to

www.site.com/gallery/img.php/pNN

Well, I found out that I had to modify the scripts because I use relative URLs and all of a sudden I was one level lower in the hierarchy. Never mind, in the end it worked.

But then, later in the evening I was running the site search reindexing all pages and weird things happened. The site search was busily indexing things like

www.site.com/gallery/index.php/img.php/pNN!

I quickly went back to the previous URL format, which Google has no problem indexing. But what about other search engines (MSN, Yahoo, Altavista)? Are they able to index URLs like
www.site.com/gallery/img.php?pic=NN?

Taran

4:48 pm on Apr 14, 2004 (gmt 0)

10+ Year Member Top Contributors Of The Month



hey hey guys.. u are talking something thats not needed.. can some explain me how to make it like domain.com/index.php?page=1

to

domain.com/index/1.htm

or something like that..
all help will be really appreciated thanks in advance.

WhosAWhata

11:32 pm on Apr 15, 2004 (gmt 0)

10+ Year Member



file: .htaccess
RewriteEngine On
RewriteCond %{REQUEST_URI}% ^index/(.*)\.htm
RewriteRule index/(.*).htm index.php?page=$1

best of luck