I initially posted the question in the Apache forum, here:
thread65-1602758
The jest of what I'm trying to do is control what domain (all pointing to the same IP address, same document root ( html_public folder) ultimately points to what subfolder. So technically, the document root for each domain is in a subdomain, not out in the main
What I can't seem to get correct is that I was wanting to do this in the .htaccess file, using some sort of conditional statements. I don't really care whether it's a php instruction or something else, I basically just want it to work.
Here's what I want to be able to say, but I'm clueless right now as to how to say it correctly:
I tried doing this with the Rewrite Condition statements, but it seems to take my first condition, and run with it. If I put site1's conditions first, then everything gets changed to Site1 info.... if site2, then it's changed to site2...
What I'm guessing is that I need some sort of code in the that says:
Is it possible for me to use PHP or anything else to basically direct this appropriately?
If you need to see what I'm trying to do with the .htaccess file in the so far, I can post that here later. The .htaccess file in each subdirectory, currently, is the default .htaccess file set by Drupal. The one I put in the root ( http_public folder) is the one where I'm trying to direct the traffic.
Sorry if I'm making no sense, and I'd greatly appreciate any guidance on this if at all possible.
Thanks in advance. (and yes, I realize my syntax isn't right - it's basically VB/VBA syntax, so if you need me to rewrite it to make sense, I'll do so. )
thread65-1602758
The jest of what I'm trying to do is control what domain (all pointing to the same IP address, same document root ( html_public folder) ultimately points to what subfolder. So technically, the document root for each domain is in a subdomain, not out in the main
What I can't seem to get correct is that I was wanting to do this in the .htaccess file, using some sort of conditional statements. I don't really care whether it's a php instruction or something else, I basically just want it to work.
Here's what I want to be able to say, but I'm clueless right now as to how to say it correctly:
Code:
If IncomingDomain = site1.com Then
Go To /site1 subfolder
ElseIf IncomingDomain = site2.com Then
Go To /site2 subfolder
End If
I tried doing this with the Rewrite Condition statements, but it seems to take my first condition, and run with it. If I put site1's conditions first, then everything gets changed to Site1 info.... if site2, then it's changed to site2...
What I'm guessing is that I need some sort of code in the that says:
Code:
If the incoming domain name is site1.com then
look in folder /site1 as the doc root
ElseIf incoming domain name is site2.com then
look in folder /site2 as the doc root
End If
Is it possible for me to use PHP or anything else to basically direct this appropriately?
If you need to see what I'm trying to do with the .htaccess file in the so far, I can post that here later. The .htaccess file in each subdirectory, currently, is the default .htaccess file set by Drupal. The one I put in the root ( http_public folder) is the one where I'm trying to direct the traffic.
Sorry if I'm making no sense, and I'd greatly appreciate any guidance on this if at all possible.
Thanks in advance. (and yes, I realize my syntax isn't right - it's basically VB/VBA syntax, so if you need me to rewrite it to make sense, I'll do so. )