Basically I have this htaccess:
Options +FollowSymLinks
Options -MultiViews
RewriteEngine On
RewriteBase /
RewriteCond %{HTTP_HOST} !^www\. [NC]
RewriteCond %{HTTP_HOST} ([a-z0-9-]+).([a-z0-9-]+)([/admin])? [NC]
RewriteRule ^$ index.php?domainusr=%1 [L]
Imagine that the subdomain will be a User, and I want to get that user. But the thing is this htaccess will work, with some drawbacks:
- If I access something like: "http://username.domain.com/" it will work.
- If I access "http://username.domain.com/index.php" it will not.
- If I access any other urls than "http://username.domain.com/", like: "http://username.domain.com/admin/", "http://username.domain.com/front/index.php", it won't work.
My question is: How can I have this subdomain as a GET parameter in EVERY accessable content, without interfering with others GETs?