how would my .htaccess need to look if I wanted subdomains to forward to a specific page "parameter"
eg; http://subdomain.c.example.com > http://c.example.com/page.php?i=subdomain
I can't figure out how the .htaccess works.
how would my .htaccess need to look if I wanted subdomains to forward to a specific page "parameter"
eg; http://subdomain.c.example.com > http://c.example.com/page.php?i=subdomain
I can't figure out how the .htaccess works.
Try this:
RewriteEngine On
RewriteCond %{HTTP_HOST} ^(.+)\.c\.example\.com$ [NC]
RewriteRule . http://c.example.com/page.php?i=%1 [L,R]
Also, in the future when doing examples, use example.com
. That domain is provided in the spec for use in documentation, and is guaranteed not to resolve to someone's real domain.