It's possible with URL Rewriting.
Put this in a .htaccess file in you website root folder :
<IfModule mod_rewrite.c>
RewriteEngine on
RewriteCond %{HTTP_HOST} ^(.*)\.autocosts\.org$ [NC]
RewriteRule (.*) http://autocosts.org/index.php?c=%1 [L,QSA]
</IfModule>