0

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.

1 Answers1

3

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
  • 52,691
  • 28
  • 123
  • 168
  • 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 Mar 02 '10 at 20:59
  • 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 Mar 02 '10 at 21:07
  • that is virtual-server. I have found "http.include"-file. can i do something like this: ServerName test.com:80 ServerAlias www.test.com UseCanonicalName Off DocumentRoot /var/www/vhosts/test.com/httpdocs/english/ ServerName test.de:80 ServerAlias www.test.de UseCanonicalName Off DocumentRoot /var/www/vhosts/test.com/httpdocs/german/ ? I can edit the file. The problem is, my server is running with plesk. – Dietrich Pupkin Mar 02 '10 at 21:30
  • 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 Mar 02 '10 at 22:34