I have this in my .htaccess
Code:
RewriteEngine On
RewriteCond %{HTTP_HOST} !^www\.rdy\.cc
RewriteCond %{HTTP_HOST} ([^.]+)\.rdy\.cc
RewriteRule (.*) red.php?subdomain=%1&file=$1 [L]
The dynamic subdomain part of the script works. Here is an example:
http://checkthisout.rdy.cc/get/thisfile.html (Click that link and it will show you the subdomain variable and file variable)
checkthisout gets stored in the subdomain variable, however the "get/thisfile.html" no matter how hard I try will not go into the file variable. It usually returns red.php.
What am I doing wrong?
Thanks!
EDIT:
God...I always post right before I find the answer. The last line should read:
RewriteRule (.*) red.php?subdomain=%1&file=$1 [L,QSA]
And it works!