Hi, I've done a quick brief over some of the FAQs, and searching some forum postings, so please redirect me if I missed one that is accurate to my question.
First, I just want to make sure I've got it down pat - so, is Apache using PHP programming, or else is it basically it's own language in the configuration files, or what? Well, that's just an aside, trying to understand things better.
Here's my situation that I'm trying to sort out currently:
1. I've got a shared hosting account, where I've put up 2 totally separate installed drupal websites - the databases (mysql) are totally separate, and the code base is totally separate.
2. The way I have it configured is I installed each their own mysql database, and put the drupal files for each site in it's own subdirector under the server folder. So, they are like this: points to and points to
At least that's how I WANT it to work.
One of the domains is handled by the web host, and the other domains (all pointing to site2) are registered via another provider.
From what I've seen, it looks like the best performance will be in configuring my .htaccess file(s) correctly to get the job done.
So, here's what I'm trying to do:
1. For each domain, I would like to put a conditional statement of some sort - an IF statement, or even CASE statement if one exists for .htaccess files....
Instead of talking more, I'm goign to type up what I'd like to do, though I have NO CLUE if this is even close to possible:
From what I've seen, I'm sure that's not correct syntax, but I'm just trying to get the idea accross.
What I've tried to do is using the REWRITE directives, if that's the correct terminology.
I tried having REWRITECOND .... dealing with site1
REWRITERULE.... dealing with site1
REWRITECOND.... dealing with site2
REWRITERULE.... dealing with site2
But what ends up happening is it follows the first one, and ignores the second.
Is there not a way to have the code follow a certain section if the correct domain was entered, or else follow a totally separate section of code if the second domain is entered?
Please forgive my ramblings. I want to learn a lot in this area, and think I have the capacity to. I just have so many irons in the fire, that I tend to run out of time for learning such.
Any references, suggestions, etc greatly appreciated.
First, I just want to make sure I've got it down pat - so, is Apache using PHP programming, or else is it basically it's own language in the configuration files, or what? Well, that's just an aside, trying to understand things better.
Here's my situation that I'm trying to sort out currently:
1. I've got a shared hosting account, where I've put up 2 totally separate installed drupal websites - the databases (mysql) are totally separate, and the code base is totally separate.
2. The way I have it configured is I installed each their own mysql database, and put the drupal files for each site in it's own subdirector under the server folder. So, they are like this: points to and points to
At least that's how I WANT it to work.
One of the domains is handled by the web host, and the other domains (all pointing to site2) are registered via another provider.
From what I've seen, it looks like the best performance will be in configuring my .htaccess file(s) correctly to get the job done.
So, here's what I'm trying to do:
1. For each domain, I would like to put a conditional statement of some sort - an IF statement, or even CASE statement if one exists for .htaccess files....
Instead of talking more, I'm goign to type up what I'd like to do, though I have NO CLUE if this is even close to possible:
Code:
<If Incoming URL = [URL unfurl="true"]www.site1.com[/URL] Then
Do all the stuff for this domain/directory
>
<If Incoming URL = [URL unfurl="true"]www.site2.com[/URL] Then
Do all the stuff for this domain/directory
>
From what I've seen, I'm sure that's not correct syntax, but I'm just trying to get the idea accross.
What I've tried to do is using the REWRITE directives, if that's the correct terminology.
I tried having REWRITECOND .... dealing with site1
REWRITERULE.... dealing with site1
REWRITECOND.... dealing with site2
REWRITERULE.... dealing with site2
But what ends up happening is it follows the first one, and ignores the second.
Is there not a way to have the code follow a certain section if the correct domain was entered, or else follow a totally separate section of code if the second domain is entered?
Please forgive my ramblings. I want to learn a lot in this area, and think I have the capacity to. I just have so many irons in the fire, that I tend to run out of time for learning such.
Any references, suggestions, etc greatly appreciated.