|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
You don't need a fax machine to get faxes. Get a fax-to-email fax number from CallWave. Try it free.
|
|
#1
|
||||
|
||||
|
search engines and cookie
Hi,
I hope this the correct forum where to post my question. I'm going to use cookies within my php application to store the language ( actually I use another method ). My application will store articles as: /mydomain.com/article/id So no query string in the url. I use the apache mod_rewrite rules inside httpd.conf to do the trick. I have a bilignual site, so the cookie will contain the language. I have some questions: a) I have no idea If search engines work right with cookies. I'm afraid that the pages could not be indexed due to the fact that the language is stored inside cookies. b) For every page I will have a link to change the language. For example: If the current page is /article/333 ( english version ) I thought to put a link such as /article/333/set_italian which will change the language to italian (with a cookie), and then redirect the page to /article/333 but with content updated in italian. Is this correct ?!? I do not want having something like: /article/333?set_lang=it ------- As you could see I'm totally new about this argument, and I have some doubts about how I can do it. So, any suggestions/advices will be appreciated. Thank you!
__________________
My article: mod_rewrite: No More Endless Loops! |
|
#2
|
||||
|
||||
|
My suggestion would be to do this with virtual hosts-
have "www.yourdomain.com" be your main language, and then have "spanish.yourdomain.com" be spanish, for example. You could then choose the language template according to the SERVER_NAME environment variable returned from the client. This will give you the advantage of not having to mess with query strings, and will give you a search-engine friendly language-specific URL to use. I don't think search engines look at cookies at all, or at least I wouldn't rely on it, and the query string method would require you to enforce this everywhere you create a URL, where the virtual host option could be managed in pretty much one place. If you were using perl and CGI::Application/HTML::Template (as I do), this is a trivial task. Should be easy with PHP too, as long as you've practiced good application design and separated your code from your HTML. |
|
#3
|
||||
|
||||
|
Thanx for the suggestions,
I have to say a very good one, never thought about that. During the past days I thought about your tips and still now, but I think I will adopt another approach. I thought to use this url layout: /articles_en or /articles_it for articles list /articles_en/333 for article 333 /articles_it/333/2 for page 2 of article 333 /articles_it/333/print for a printable version of article 333 /pdf/article333_it.pdf for a pdf version of article 333 All these url paths will be internally redirected to a script /articles.php with lang, id, page, etc, as query (?) parameters. A cookie is used to remember the last language settings only for the home page, so writing example.com I will go to /home_en or /home_it Using en.example.com I think could generate confusion to people, even if your tips do not want to leave my mind.... ![]() Last edited by pippo : February 7th, 2002 at 07:14 AM. |
|
#4
|
||||
|
||||
|
Some search engines only want to index from the root with no path information, so you're going to be causing yourself grief here if you want to have your site indexed in multiple languages- you'll only be able to submit one root.
I still think that this language choice thing is better encoded in the domain, and not the query string. You can still have a main page with a cookie-set language choice, but in this instance you'll have one clear web root for each language that you can submit to the appropriate search engines, leading to maximum indexability in combination with your spider-friendly URLs. The other option is just to register different names- www.domain.com for english, www.spanishdomain.com for spanish or whatever. I guess it all depends on how serious you are, as to whether or not you want to register multiple domains. I still think, whatever you do, if you're serious about search engine indexability that you shouldn't encode language info the path, only the domain. |
|
#5
|
||||
|
||||
|
uhmm...telling the truth I have both domains ( ie .it and .com )
So actually mystamps.com and mystamps.it points to the same site ( server ). mystamps.com is the name where I run the server, the .it points to it So maybe I could have: mystamps.com for international people and mystamps.it for italian guys. But If have to put the "spot" into a tech journal or tell a friend...hey my site is...what should I put ?!? tx for your advices... ps I see that your bottom link is about coins, my sites are 'bout stamps.... ![]() Last edited by pippo : February 7th, 2002 at 09:06 AM. |
|
#6
|
||||
|
||||
|
My idea would be that you put "www.mystamps.com" as the general contact, where they get the english site, with a prominent link at the top of each page for the italian version, "mystamps.it".
Then, your site can serve the correct template depending on what the domain is- .it, give an italian template, .com, give english. In english publications, you give the .com, in italian publications you give .it. Either way, they are served from the same code base using a different template. Here's why I've reconsidered the idea of using a cookie-based language page- this would probably require a redirect, and search engines don't like redirects at all. I don't think have two domains would be a hinderance at all. You could do language selection without redirects and without path/query string encoding. Major plus. |
![]() |
| Viewing: Dev Shed Forums > Other > Dev Shed Lounge > search engines and cookie |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|
|