Basically I want * .domain.com to pull out domain.com/*/(not redirect).
I went into the cPanel subdomains section and installed a template for this domain. It seems that it resolves correctly, i.e. * .domain.com brings up domain.com.
Now I created 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 get is "500 Internal Server Error", any ideas?
source
share