httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Campbell, Lance" <la...@illinois.edu>
Subject RE: [users@httpd] Apache RedirectMatch or Virtual Host Help Needed
Date Tue, 24 Jun 2008 20:38:58 GMT
The solution is:

RewriteCond %{REQUEST_FILENAME}   !\.(js) [NC]
RewriteCond %{HTTP_HOST}   !^illinois\.edu [NC]
RewriteCond %{HTTP_HOST}   !^$
RewriteRule ^/(.*)         http://illinois.edu/$1 [L,R=301]

I pieced this solution together from a couple of different examples that
solved unrelated problems.

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@illinois.edu
 

-----Original Message-----
From: Campbell, Lance [mailto:lance@illinois.edu] 
Sent: Tuesday, June 24, 2008 2:31 PM
To: users@httpd.apache.org
Subject: RE: [users@httpd] Apache RedirectMatch or Virtual Host Help
Needed

Actually we have confirmed that the redirect of content works in all
browsers for HTML content.  But for redirecting of JavaScript only IE7
seems to have an issue.  It won't display the .js files.



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@illinois.edu
 

-----Original Message-----
From: Krist van Besien [mailto:krist.vanbesien@gmail.com] 
Sent: Tuesday, June 24, 2008 2:13 PM
To: users@httpd.apache.org
Subject: Re: [users@httpd] Apache RedirectMatch or Virtual Host Help
Needed

On Tue, Jun 24, 2008 at 21:07, Campbell, Lance <lance@illinois.edu>
wrote:

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

Are the Javascript files that are included loaded by the browser? Are
they present where the browser expects them? Have a look in the log of
your webserver. I can also suggest using the excellent "Firebug" add
on for Firefox, which can show you a lot of what happens when you load
a page.

Krist


-- 
krist.vanbesien@gmail.com
krist@vanbesien.org
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?

---------------------------------------------------------------------
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@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.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@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.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@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Mime
View raw message