Hey guys,
I've been trying out different things for several days now and have finally decided to ask for help.
So here's the situation, we have a site (domain.com) and wildcard dns is setup and working properly. entering someone.domain.com displays domain.com's content so all is good there.
What I need is to process a different script (note: not redirect, the url must be masked), like if the request is dummy.domain.com, it should mask the url to stay the same but really process /public_html/partners/dummy. It works as intended until I try to visit a directory like dummy.domain.com/files where it redirects the browser to domain.com/partners/dummy/files
Here's what I have on public_html/.htaccess
RewriteEngine On
Options +FollowSymLinks
RewriteBase /
RewriteCond %{HTTP_HOST} !www.domain.com$ [NC]
RewriteCond %{HTTP_HOST} ^([a-z0-9-]+).domain.com [NC]
RewriteRule (.*) http://domain.com/partners/%1/$1 [P,L]
If I try to visit a non-existent directory like dummy.domain.com/asdf, it works fine. The 404 says that it cant find the directory or file at partners/dummy/asdf so I'm thinking it must be something on the /files directory. Here's the htaccess under the files directory
<IfModule mod_rewrite.c>
RewriteEngine On
Options +FollowSymLinks
RewriteBase files/
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^.*$ index.php [L]
</IfModule>
Hope you guys can help me out.
Thanks!