Index: [Article Count Order] [Thread]

Date:  Mon, 2 Jun 2008 10:35:33 -0400
From:  Jeremy Knope <jerome (at mark) rainstormconsulting.com>
Subject:  [coba-e:13143] Re: Domain Alias
To:  coba-e (at mark) bluequartz.org
Message-Id:  <2F50816F-EF37-4BE3-99BC-E23D3AE8A818 (at mark) rainstormconsulting.com>
In-Reply-To:  <615824.82104.qm (at mark) web65602.mail.ac4.yahoo.com>
References:  <615824.82104.qm (at mark) web65602.mail.ac4.yahoo.com>
X-Mail-Count: 13143

Sorry, I didn't word that very well.  I haven't actually had to write  
one that allowed different domains (like .net and .com) and force www.  
without changing the TLD.  I think it might be possible but not  
entirely sure how to do it.  I think in this case I would end up  
resorting to PHP if possible since it'd be a lot easier to sort out  
with some if's and such.

I think if you can get match say example.net or example.com, then use  
that value in the rewriterule to tack www. on to it that might work.   
Not sure how you use HTTP_HOST within the rewrite rule line itself.
  -- Jeremy
Jeremy Knope
Web Programmer
Rainstorm Consulting: http://www.rainstormconsulting.com
"Designing Strategies for Internet Success."
jerome (at mark) rainstorminc.com
Phone: 207-866-3908
Fax: 207-866-0297

On Jun 1, 2008, at 3:23 PM, Dan Kriwitsky wrote:

>
> --- Jeremy Knope <jerome (at mark) rainstormconsulting.com> wrote:
>
>> I've ran into this issue before, and would be awesome if a feature  
>> was
>> implemented to control it.  Instead I have to edit the site's config
>> file in /etc/httpd/conf/vhosts/siteXX
>> In that file look for a block of rewrite rules, I comment them all  
>> out.
>> Looks like this:
>> RewriteEngine on
>> RewriteCond %{HTTP_HOST}                !^1.2.3.4(:80)?$
>> RewriteCond %{HTTP_HOST}                !^www.example.net(:80)?$ [NC]
>> RewriteRule ^/(.*)                      http://www.example.net/$1  
>> [L,R]
>> RewriteOptions inherit
>>
>> commenting those all out will prevent the server from forcing the
>> single domain on that site.  I usually end up doing an .htaccess to  
>> do
>> anything else like force www. or no www.
>
> Can you give an example of .htaccess to force www without forcing a
> specific domain?
>
> -- 
> Dan Kriwitsky
>
>
>
>


	

13143_2.html (attatchment)(tag is disabled)