.oO(Freebeeezz)
>I got a domain (www.mydomain.com) that support wildcards eq.
>belgium.mydomain.com shows the same page as www.mydomain.com.
>I want to redirect the user that types "belgium.mydomain.com" in the
>adresbar to a directory "Belgium" wich is on the same server.
>I've heared that you can do this redirect with PHP.
You don't even need PHP for this. If it's an Apache webserver you can
achieve the same with a mod_rewrite (if available) rule in a .htaccess
file, e.g.
RewriteEngine On
RewriteCond %{HTTP_HOST} ^belgium.example.com [NC]
RewriteRule ^(.*)$ http://www.example.com/belgium/$1 [L,R]
Or something like that ...
HTH
Micha
|