The Cache: Technology Expert's Forum
 
*
Welcome, Guest. Please login or register. September 16, 2019, 09:22:47 PM

Login with username, password and session length


Pages: [1]
  Print  
Author Topic: subdomains, htaccess and automatic translation  (Read 2804 times)
m0nkeymafia
Expert
****
Offline Offline

Posts: 240


Check it!


View Profile
« on: February 20, 2008, 02:19:04 AM »

Hi Guys, not sure where this should go so here it is...

I am looking to provide one of my sites in different languages using google translate, for purposes of SEO and maintaining site structure etc I would like the other languages to be accessed via subdomain

I.e. fr.domain.com or it.domain.com

However I cannot for the life of me get it working. I have tried something like this:

RewriteCond %{HTTP_HOST} ^fr\.domain\.com
RewriteRule ^(.*)$ http://www.google.com/translate_c?hl=fr&sl=en&u=http://domain.com/$1 [R=permanent,L]

Except I get an error such as:
"Unable to determine IP address from host name for domain.com"

Anyone have any ideas? I believe its a problem due to DNS resolution on the server, but my host don't seem to understand the problem...
Logged

I am Tyler Durden
Bompa
Administrator
Lifer
*****
Offline Offline

Posts: 564


Where does this show?


View Profile
« Reply #1 on: February 20, 2008, 06:34:48 AM »

I never thought of doing it that way.  So, I tried that with one of my sites and all the links on
my pages are relative links to google translate; no matter what i click, I get another google URL, duh.

anyways, have you created the subdomain fr.yourdomain.com ?
if so, the .htaccess file should be in the fr's folder.

Is that how you have it set up?
Logged

"The most beautiful and profound emotion we can experience is the sensation of the mystical..." - Albert Einstein
m0nkeymafia
Expert
****
Offline Offline

Posts: 240


Check it!


View Profile
« Reply #2 on: February 20, 2008, 06:51:59 AM »

I tried to just catch [in the main htaccess].
Perhaps I need to physically create each subdomain, have it point to a subfolder, then attempt to use some PHP scripting goodness to parse it all.

Bah it shouldnt be this hard... mind you it would be worth it if i got X times more traffic simply for localised searches!! Woop

And yeah google tends to hijack the links, looks like I might have to parse them out so it looks all nice on the site and so forth.

Did you have any success, traffic / rankings wise, with different languages?
Logged

I am Tyler Durden
Bompa
Administrator
Lifer
*****
Offline Offline

Posts: 564


Where does this show?


View Profile
« Reply #3 on: February 20, 2008, 06:57:45 AM »

I tried to just catch [in the main htaccess].
Perhaps I need to physically create each subdomain, have it point to a subfolder, then attempt to use some PHP scripting goodness to parse it all.

Yah, that's the DNS problem that you mentioned.  You can not do wildcard subdomains with
just .htaccess.

I would create the subdomain, point it to it's own folder, then put an htaccess like you had
in that folder.  and i would do that for each language.





Quote
Did you have any success, traffic / rankings wise, with different languages?

last year, but the sites got banned and i never bothered again.


Logged

"The most beautiful and profound emotion we can experience is the sensation of the mystical..." - Albert Einstein
Pages: [1]
  Print  
 
Jump to:  

Perkiset's Place Home   Best of The Cache   phpMyIDE: MySQL Stored Procedures, Functions & Triggers
Politics @ Perkiset's   Pinkhat's Perspective   
cache
mart
coder
programmers
ajax
php
javascript
Powered by MySQL Powered by PHP Powered by SMF 1.1.2 | SMF © 2006-2007, Simple Machines LLC
Seo4Smf v0.2 © Webmaster's Talks


Valid XHTML 1.0! Valid CSS!