Re: Global 301 Redirects

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

 




----- Original Message -----
> Greetings,
> 
> I'm trying to figure out a way to have each of my vhosts do a 301
> redirect upon receiving a request which contains "www."
> 
> Basically we want to drop all of those www subdomains for SEO
> purposes,
> but we are hosting dozens of websites, and would rather not have to

Really? Just dozens?

> put
> in a redirect on every vhost entry.  My thought were that we could do
> this using mod-rewrite and regexp, but not sure.

Anyway... Sure you could use mod_rewrite to complicate your config
even more -- as, with dozens! of vhosts you're afraid of touching them

But even then you'd have to add, at least:

RewriteEngine On
RewriteOptions inherit

to each vhost.

> Any insights?

Now, instead of complicating things, why not take a shot at simplifying
it with mod_macro:
http://www.cri.ensmp.fr/~coelho/mod_macro/
 
> Thanks.
> 
> --
> --asai

i

-- 
Igor GaliÄ

Tel: +43 (0) 664 886 22 883
Mail: i.galic@xxxxxxxxxxxxxx
URL: http://brainsware.org/

---------------------------------------------------------------------
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