PDA

View Full Version : Please, explain me



pierrebenoit
08-10-2004, 01:25 PM
Hi,

I read here some posts about SE friendly url but I still have some questions. Every sample I saw was with 2 parameters like
product.php?id1=something&id2=otherthing

In one of my site, I have some url like product.php?id=something
For me, this url is OK but I want to know if Google can index this kind of url.

Do you thing I really need to use .htaccess/mod-rewrite in order to have links like product.php/id/something

Thanks

freekrai
08-10-2004, 01:28 PM
at the least, you need to change the id= to something other than id
possibly change it to product.php?prod=something or else switch to the mod_rewrite stuff.

r2d2
08-10-2004, 01:59 PM
Google doesnt like querystrings with 'id' in because they could be sessionids which could put the bot in a loop.

I would recommend reading a good tutorial to find out how to create SE friendly URLs, eg http://www.websitepublisher.net/article/search_engine_friendly_urls/

incka
08-10-2004, 02:00 PM
change id= to item=

use .htaccess rather than mod_rewrite

Kings
08-10-2004, 02:13 PM
change id= to item=

use .htaccess rather than mod_rewrite.htaccess = mod_rewrite ;)

freekrai
08-10-2004, 02:15 PM
.htaccess = mod_rewrite ;)
It doesn't necessarily mean mod_rewrite ;)
.htaccess could be used with forcetype instead :D

incka
08-11-2004, 03:59 AM
That's what I meant by .htaccess - forcetype. That is what I use.

freekrai
08-11-2004, 07:28 AM
That's what I meant by .htaccess - forcetype. That is what I use.
That's what I figured you meant, was why I mentioned the difference.

incka
08-11-2004, 08:30 AM
I knew, you had got it right, it was the other guy I was saying that too.

Emancipator
08-11-2004, 08:55 AM
You sure google gets hung up on ids? It reads mine just fine. All 800+ pages of them, spiders the content dandy.

Chris
08-11-2004, 09:19 AM
They used to, or they sometimes still do. In anycase it is a very easy change and so its better to be safe than sorry.

Emancipator
08-11-2004, 09:26 AM
Ive never tried to do it before, is there a 4second explanation for it? I will give it a try no my site.

r2d2
08-11-2004, 10:39 AM
http://www.websitepublisher.net/article/search_engine_friendly_urls/

Not quite 4 seconds, but should sort you out :)

incka
08-11-2004, 10:59 AM
I tried to change it on a script I am using but it didn't work. The files didn't understand the new URLs and I couldn't figure out why... Well it's only a small part of my new site...

Emancipator
08-11-2004, 11:25 AM
http://www.websitepublisher.net/article/search_engine_friendly_urls/

Not quite 4 seconds, but should sort you out :)

Thanks R2 I am going to check it out. I am a googleaholic and done well bby it, but just never played with the whole replacement of vars since last i checked google has no problem with them... although 2years ago it did.

Now with htat said I am not talking session ids, those are a ***** :P

intelliot
08-13-2004, 01:15 AM
You sure google gets hung up on ids?
You're right, it does not anymore.

however, there are other SE's out there - why take the chance if you don't have to.

pierrebenoit
08-13-2004, 01:35 PM
Thanks for your help.

I changed all id= to item= in the script. I would like to use .htaccess but need help because the variable is a combinaison of numbers and letters.

Some url I want to rewrite:
http://personal-advisor.cyber-boutik.com/index.php?item=411be29c76efe
http://personal-advisor.cyber-boutik.com/index.php?item=4117e43021452

I want something like:
http://personal-advisor.cyber-boutik.com/index.php/item/411be29c76efe
http://personal-advisor.cyber-boutik.com/index.php/item/4117e43021452

But not really sure if I need that to get indexed by search engine

So I wrote this in .htaccess:
================================================== ==
RewriteEngine On
RewriteRule ^item/([A-Za-z]+)$ index.php?item=$1
================================================== ==

Any advice?

intelliot
08-14-2004, 12:44 AM
Since you have index.php in the URLs you want, there is no need to bother with .htaccess at all. Your PHP script just needs to be modified, and I believe there is an article on websitepublisher that can help.

If you wish to remove the .php, look into using ForceType application/x-httpd-php