sweet. Thank you I'll give this a try. Thanks for everyones feedback. I'd love to get your (all) take on this setup, I'm actually trying to reduce setup time on the server and dns. Here is what I am doing:
1) route name servers of domain to everydns.net 2) Set A record on domain.com to my server 3) Set *.domain.com to CNAME to domain.com 4) I have a virtual host that will "accept" all domains without subdomains. (where the rule below exists). Default behavior is to redirect at the end to a default domain assuming no matches. 5) I have a virtual host that will accept It also based on domain and subdomain will dynamically set the folder for the domain using rewrite rules. Assuming no match, there is a default domain folder that is used. 6) go create the folders necessary where I will work on the project. here is the virtual host config if you have a sec to check it out: http://pastebin.com/3ehgH4E8 One thing I ask is, are there any security issues with this approach? Thanks Again On Jan 19, 2011, at 11:49 AM, Bryan Petty wrote: > On Wed, Jan 19, 2011 at 10:24 AM, Chad Sollis <[email protected]> wrote: >> 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. > > Ah, ok, so I think this should work instead: > > RewriteCond %{HTTPS} =off > RewriteCond %{HTTP_HOST} ^([^\.]+\.[^\.]+)$ [NC] > RewriteRule ^(.*)$ http://www.%1/$1 [L,R=301,QSA] > RewriteCond %{HTTPS} =on > RewriteCond %{HTTP_HOST} ^([^\.]+\.[^\.]+)$ [NC] > RewriteRule ^(.*)$ https://www.%1/$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
