Language of a web site in ASP.NET

T

ThunderMusic

Hi,
Ok, I find myself having a lot of troubles with URL Rewriting and I've seen
on the net that in some situations, indexers have difficulty indexing sites
because of some flaws in the url rewriting mecanism...

Does anybody have a solution to my problem? I mean, I want to be able to
localize my web site without having to dupplicate all the pages in 2-3 (fr,
en, sp(optional)) directories and so the indexers can index the right
content (in the right language) and people can bookmark the page in the
right language too. Is it something possible? I'd like to avoid dupplicating
pages because it could mean a pain in the 'you know what' to maintain...
imagine a bug in one would have to be corrected in 3 places instead of
1...

Thanks a lot

ThunderMusic
 
T

ThunderMusic

hi,
thanks for the link... but I already know how to localize an ASP.NET
application. The thing is, site indexers like the ones of Google don't try
every languages for a page, it just indexes each page with it's url and the
content it encounters on the page... so I want to know how I can do my site
so the indexers can index my site in english, in french and maybe in spanish
(maybe someday) or any other language (and can lead the user to the page in
the right language too). Someone told me I should do like
www.mysite.com/fr/pages.aspx and www.mysite.com/en/pages.aspx but that would
mean I have to copy my pages in 2 or 3 different directories and load
different resource files... this is an option, but I would like to avoid
it. Is there a better way to do so?

I've heard of url rewriting, but everytime I try to rewrite a URL, I end up
getting a blank page with only the basic structure of the html (<doctype
....><html><head></head><body></body></html>). Moreover, I've seen many sites
(forums and blogs) that said the URL rewriting mecanism has problems with
IIS6 and Windows 2003 because it returns a 302 instead of a 200 for
rewritten pages, which causes indexers not to index the page.

Anybody have an idea?

Thanks

ThunderMusic
 
P

patrice_scribe

Sorry, wondered what the exact problem was as you talked about several
things in your first posts...

How do you perform language selection ? If you just serve content
based on the user agent language preference a robot will always see
the same language. Also keep in mind that robots are just following
hyperlinks. So if you have a way for the user to select manually the
preferred language using a postback, the robot won't detect and use
this.

AFAIK the usual solution is to check for the user agent. If this is a
robot add hyperlinks to alternate languages (possibly only on the home
page) so that the robot can follow those links and index alternate
language contents...

URL rewriting allows to expose the same page as both /mysite/fr/
page.aspx and /mysite/en/page.aspx (it makes those request be
processed as /mysite/page.aspx?lang=fr or /mysite/page.aspx?lang=en)
but it doesn't matter, a robot will still be able to index those pages
as long as it find an hyperlink.

If it looks like your site should already work, feel free to exlain
how it works regarding language selection (and if public you could
even post its url).
 
D

David

Patrice, I would advise against advising to check for robots and write the
page differently, as that can get you penalised by the search engines. You
should design the page to be as search engine friendly from the outset. If
you are thinking of using linkbuttons, consider if you can use a hyperlink
instead. It might mean you having to add stuff to your querystring and doing
request.querystring in your code, but it means that not only can SEs read
the site, but also allow pages to be bookmarked easily.

As to the problem with url rewriting. I have just checked my log files. I am
getting a 200 status code on re-written pages. I also have a 404 error page
that does rewriting and that is returning a 200.

I have just checked my log files. The only 302 I have is where I expect
them. This is a redirect from my login page and a redirect if my session
times out whilst logged in.

--
Best regards,
Dave Colliver.
http://www.AshfieldFOCUS.com
~~
http://www.FOCUSPortals.com - Local franchises available
Sorry, wondered what the exact problem was as you talked about several
things in your first posts...

How do you perform language selection ? If you just serve content
based on the user agent language preference a robot will always see
the same language. Also keep in mind that robots are just following
hyperlinks. So if you have a way for the user to select manually the
preferred language using a postback, the robot won't detect and use
this.

AFAIK the usual solution is to check for the user agent. If this is a
robot add hyperlinks to alternate languages (possibly only on the home
page) so that the robot can follow those links and index alternate
language contents...

URL rewriting allows to expose the same page as both /mysite/fr/
page.aspx and /mysite/en/page.aspx (it makes those request be
processed as /mysite/page.aspx?lang=fr or /mysite/page.aspx?lang=en)
but it doesn't matter, a robot will still be able to index those pages
as long as it find an hyperlink.

If it looks like your site should already work, feel free to exlain
how it works regarding language selection (and if public you could
even post its url).
 
P

Patrice

Yes, I also use hyperlinks but it doesn't look like the OP currently does.
Short of a redesign even hidden hyperlinks should quickly fiex the problem
so that the page is always the same.

Not sure what you meant with the second part. For now it looks like to me
that URL rewriting doesn't have anything to do with the current problem.

Hopefull the OP will tell use how the language selection is currently
performed...
 
D

David

Hidden hyperlinks may not fix the problem if he is not programming for
them...

for example, a linkbutton posts to the same page. You have an onclick
function that is called by the linkbutton. That function will not get called
with a hyperlink unless you are checking for request.querystring and going
to the function based on your querystring. If that is the case, then no need
for the linkbutton. A problem with hyperlinks though is viewstate will not
be carried through. It really has to be a design decision and done quite
early in the process rather than way down the line where it will take a
major re-engineering task to fix.

In an earlier message, he had concerns about url-rewriting and problems with
search spiders not following correctly.

I was just explaining what I have to try and help, though I must admit, none
of my url-rewriting has been thoroughly abused by search robots yet. He had
concerns that url rewrites used a 302 (temporary) redirect (bad). Looking in
my log files, there are no 302s on rewritten pages.

--
Best regards,
Dave Colliver.
http://www.AshfieldFOCUS.com
~~
http://www.FOCUSPortals.com - Local franchises available
 
P

Patrice

Granted, it may be not enought depending on how it currently works. And yes,
url rewriting is anyway a strictly server side thing so it shouldn't be an
issue in itself (but still can depend on other factors as you said).

IMO we can't do much more without knowing how the OP handles language
selection...
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,582
Members
45,066
Latest member
VytoKetoReviews

Latest Threads

Top