I got a phpbb3 CMS running and customized a lot about it.
Now i’m trying to achieve that if somebody use the link http://xxx.domain.tld
it will redirect internal to http://domain.tld/forum.php?subdomain=xxx
The Problem i’ve got there exactly is that if you see now the content of http://domain.tld/forum.php?subdomain=xxx inside of it a css link to a other php file which lies in the same Folder as the called forum.php.
The best way were if only the subdomain root called it will internal redirect to the forum.php and any other request will handled normal.
with my many trys my best solution was this
RewriteCond %{HTTP_HOST} ^([a-zA-Z]+)\.domain\.tld$ [NC]
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !^(.*\.(jpg|png|gif|css|js))$
RewriteRule ^(.*)$ forum.php?subdomain=%1 [L]
but as you can guess the problem is with the dynamic css file, so I hope you can help me ^^
and besides: sorry for my bad english x|
Can’t you just add an exception for the php script that generates the css?
Like so: