Apache RedirectMatch or Virtual Host Help Needed

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

 



I am completely stumped on how to solve a particular problem on Apache 2.2.

 

I have a virtual host for all variations of uiuc.edu for the campus web server redirecting to “Illinois.edu”.  It works great.  Below is some of the virtual host info I am using.

 

<VirtualHost *:80>

  ServerName uiuc.edu

  ServerAlias www.uiuc.edu www.uiuc.net uiuc.net www.uiuc.org uiuc.org campus.webtools.uiuc.edu

 

        RedirectMatch (/(.*))?$ http://illinois.edu/$2

 

</VirtualHost>

 

 

I then copied the above and modified it so that I could redirect all content going to www.illinois.edu and redirect it to illinois.edu.  This is where the problem resides.  When a user goes to http://www.illinois.edu/index.html they will be redirected to http://illinois.edu/index.html.  Great!  But none of the _javascript_ includes on the index web page that start with www.illinois.edu will render.  If the _javascript_ include starts with either uiuc.edu or illinois.edu then they render fine.

 

My virtual host for www.illinois.edu looks like:

 

<VirtualHost *:80>

  ServerName www.illinois.edu             

  ServerAlias www.illinois.edu              

 

        RedirectMatch (/(.*))?$ http://illinois.edu/$2

 

</VirtualHost>   

 

Any thoughts on how I can resolve this issue?

 

In order to get this to currently work, I put www.illinois.edu in the Server Alias section in the Illinois.edu virtual host.  Now if someone comes to the home page with www.illinois.edu they stay within that domain.  Ideally I would like to redirect them to Illinois.edu. 

 

Thanks,

 

Lance Campbell

Project Manager/Software Architect

Web Services at Public Affairs

University of Illinois

217.333.0382

http://webservices.uiuc.edu

My e-mail address has changed to lance@xxxxxxxxxxxx

 


[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