Woops, I misread.  I thought you meant, redirecting all subdomains, to 
the domain.

wildcard dns record that points to that IP.  Configure apache to handle 
all request for that IP to the same document root.

You can use .htaccess or a scripting language to handle the redirect.

A quick google search shows both methods.

Trevyn

On 1/19/11 10:35 AM, Chad Sollis wrote:
> using everydns, is that possible?
>
> I like that route, however, I also like being able to control it on the 
> server so I do not have to update every domain in dns.
>
> (although I am curious if everydns can do that)
>
> ~Chad
>
>
> On Jan 19, 2011, at 10:31 AM,<[email protected]>  wrote:
>
>    
>> Why not just use DNS? instead of mod rewrite?  Sorry if I missed
>> previous info.
>>
>> Trevyn
>>
>> On Wed, 19 Jan 2011 10:24:00 -0700, Chad Sollis<[email protected]>
>> wrote:
>>      
>>> Thanks Brian,
>>>
>>> sorry for not being totally clear.  What I want it to do is actually
>>> anything without a subdomain, to redirect to www.domain.com  if it has
>>> a subdomain, it will be ignored.  Good catch on the QSA.
>>>
>>> how would you change the rule to match according to that objective?
>>>
>>> thanks
>>>
>>> ~Chad
>>>
>>>
>>> On Jan 19, 2011, at 1:00 AM, Bryan Petty wrote:
>>>
>>>        
>>>> On Tue, Jan 18, 2011 at 2:19 PM, Chad Sollis<[email protected]>  wrote:
>>>>          
>>>>> Hey there... to the tune of Wade's request yesterday, trying to make that 
>>>>> a wildcard option, can anyone provide some insight, its not redirecting 
>>>>> as desired :)
>>>>>
>>>>> RewriteCond %{HTTP_HOST} 
>>>>> ^((?!\.).)*\.(com|net|org|ws|biz|ws|us|info|mobi|me)$ [NC]
>>>>> RewriteRule ^(.*)$ http://www.%1.%2/$1 [L,R=301]
>>>>>            
>>>> Are you really just trying to match _ANYTHING_ that doesn't have "www"
>>>> and redirect it to the "www" equivalent? That's what it looks like,
>>>> and you didn't explain how you want it to work.
>>>>
>>>> This seems like a really bad architectural decision if that's the
>>>> case, but if that's what you're going for, just check if it has the
>>>> "www" prefix, and if it doesn't, then redirect. Then, since you're
>>>> working towards such a wide matching constraint, you might as well
>>>> make sure it handles SSL and also query strings too, like so:
>>>>
>>>> RewriteCond %{HTTPS} =off
>>>> RewriteCond %{HTTP_HOST} !^www\. [NC]
>>>> RewriteRule ^(.*)$ http://www.%{HTTP_HOST}/$1 [L,R=301,QSA]
>>>> RewriteCond %{HTTPS} =on
>>>> RewriteCond %{HTTP_HOST} !^www\. [NC]
>>>> RewriteRule ^(.*)$ https://www.%{HTTP_HOST}/$1 [L,R=301,QSA]
>>>>
>>>> Regards,
>>>> Bryan Petty
>>>>          
>>>
>>> _______________________________________________
>>>
>>> UPHPU mailing list
>>> [email protected]
>>> http://uphpu.org/mailman/listinfo/uphpu
>>> IRC: #uphpu on irc.freenode.net
>>>        
>>      
>
> _______________________________________________
>
> UPHPU mailing list
> [email protected]
> http://uphpu.org/mailman/listinfo/uphpu
> IRC: #uphpu on irc.freenode.net
>    


_______________________________________________

UPHPU mailing list
[email protected]
http://uphpu.org/mailman/listinfo/uphpu
IRC: #uphpu on irc.freenode.net

Reply via email to