Basically I want *.domain.com
to pull up domain.com/*/
(not redirect).
I went into the subdomains section of cPanel and set a wildcard for this domain. It appears to be resolving correctly, ie *.domain.com is bringing up domain.com.
I've now made a htaccess file in the public_html directory containing:
Options +FollowSymLinks
Options +Indexes
RewriteEngine On
RewriteBase /
RewriteCond %{HTTP_HOST} !www.domain.com$ [NC]
RewriteCond %{HTTP_HOST} ^(www.)?([a-z0-9-]+).domain.com [NC]
RewriteRule (.*) %2/$1 [L]
The error I'm getting is '500 Internal Server Error', any ideas?