RE: Special configuration for requests that do not match any particular virtual host? Apache 2.2

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

 



Poop.  It's a simple oversight.  Sorry everyone.  Tom Evans example works just fine.  The example from the original post would have
worked with the addition of a *ServerName*.  Without the ServerName, the vhost entry matches everything.

#This doesn't work
<VirtualHost *:80>
  RewriteEngine On
  RewriteRule .* http://www.mydomain.com%{REQUEST_URI} [L,R=301]
  ErrorLog /var/log/httpd/error_log
  CustomLog /var/log/httpd/access_log combined
</VirtualHost>

#This works great
<VirtualHost *:80>
  ServerName localhost-monkey-whatever-you-want-just-put-something-here
  RewriteEngine On
  RewriteRule .* http://www.mydomain.com%{REQUEST_URI} [L,R=301]
  ErrorLog /var/log/httpd/error_log
  CustomLog /var/log/httpd/access_log combined
</VirtualHost>

Again my apologies for filling your inboxes.  Beer is on me next time.


---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@xxxxxxxxxxxxxxxx
   "   from the digest: users-digest-unsubscribe@xxxxxxxxxxxxxxxx
For additional commands, e-mail: users-help@xxxxxxxxxxxxxxxx



[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