Hello all. I am the happy owner of a cobalt Raq 4i.
I'm having a little problem, and I need some help.
I want to write an application that responds differently depending upon which domain name was used to reach my site.
I've dedicated an entire IP address to this single application and pointed several domain names to it.
However, when you type in the name www.domain2.com, you are instantly redirected to www.domain1.com the default name for this website. This, of course, defeats my purpose, because my script thinks you came here via www.domain1.com.
Here are the commands from my httpd.conf file for apache. I don't understand URL rewritting, so it doesn't make sense to me. The server has mod_perl, so there might be some perl in here.
<VirtualHost 111.222.333.444>
ServerName www.domain1.com
ServerAdmin admin
DocumentRoot /home/sites/site32/web
RewriteEngine on
RewriteCond %{HTTP_HOST} !111.222.333.444(:80)?$
RewriteCond %{HTTP_HOST} !www.domain1.com(:80)?$
RewriteRule /(.) http://www.domain1.com/$1 [L,R]
RewriteOptions inherit
AliasMatch /~([/]+)(/(.))? /home/sites/site32/users/$1/web/$3
AddType application/x-httpd-php .php4
AddType application/x-httpd-php .php
AddHandler cgi-wrapper .cgi
AddHandler cgi-wrapper .pl
AddHandler server-parsed .shtml
AddType text/html .shtml
</VirtualHost>
As I'm sure you're aware, I changed the file slightly to protect the innocent.
Because this is the only site that's hosted on this IP address, is there any harm in simply removing the rewrite options? I don't plan on using ~user sub webs, so I don't even need that.
Thank you so much for your help.
Matt