views:

106

answers:

1

I have three domains of the same name with tlds: .com, .de and .ru. Can I route the visitor depended on tld he had choosen?

As example: test.com routes to /english/ directory, test.de to /german/ directory, test.ru to /russian/ one.

I have full access to the server.

+2  A: 

You should make each site have its own document root. So instead of redirecting to /english, .com would just point to /home/www/mysite/english. If you are using Apache you can do this with virtual hosts.

Byron Whitlock
ok, then I have three FTP-Logins. Thats the point. I need one main directory, where I have subdirectories for /english/, /german/ stuff. I cannot give my customer root-login.
Dietrich Pupkin
huh? that has nothing to do with the document root. Are you on a shared hosting enviroment? can you edit hte apache.conf? If not you can have your cpanel point each domain to a different subdirectory.
Byron Whitlock
that is virtual-server. I have found "http.include"-file. can i do something like this:<VirtualHost 1.1.1.1:80> ServerName test.com:80 ServerAlias www.test.com UseCanonicalName Off DocumentRoot /var/www/vhosts/test.com/httpdocs/english/</VirtualHost><VirtualHost 1.1.1.1:80> ServerName test.de:80 ServerAlias www.test.de UseCanonicalName Off DocumentRoot /var/www/vhosts/test.com/httpdocs/german/</VirtualHost>?I can edit the file. The problem is, my server is running with plesk.
Dietrich Pupkin
That is the Apache conf you need. I am not very familiar with plex. But there might be an option on the cpanel to manage domains or virtual hosts or subdomains. That is Where you want to do it. .conf files in an environment like that will likley be overwritten by the server software.
Byron Whitlock