Re: Port-based vhosts

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 





On Wed, Mar 11, 2009 at 4:35 AM, Charles Sprickman <spork@xxxxxxxx> wrote:


What you need to do is check what's in the "Host" header, and if it
doesn't match the ServerName send a redirect.

RewriteEngine On
RewriteCond %{HTTP_HOST}   !^www\.foo\.com [NC]
RewriteCond %{HTTP_HOST}   !=""
RewriteRule ^/(.*)         http://www.foo.com/$1 [L,R=301]

Excellent.  It may be a challenge for me to incorporate this into the search-engine-friendly rewrite rules that Joomla uses, but I'll give it a spin on a staging box and see what happens.

What kind of performance impact, in general, do simple rewrites like this impose on a busy server?

In my experience the performance impact of a few simple rewrite rules is minimal.

Krist


--
krist.vanbesien@xxxxxxxxx
krist@xxxxxxxxxxxxx
Bremgarten b. Bern, Switzerland
--
A: It reverses the normal flow of conversation.
Q: What's wrong with top-posting?
A: Top-posting.
Q: What's the biggest scourge on plain text email discussions?

[Index of Archives]     [Open SSH Users]     [Linux ACPI]     [Linux Kernel]     [Linux Laptop]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Squid]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]

  Powered by Linux