Hi, I am trying to redirect traffic from the root address at my default server (of two name-based virtual hosts) to /blog/. I.e. I would like traffic for www.depaulacs.org/ to go automatically to www.depaulacs.org/blog/. But I don't want to affect anything to do with the second virtual host. Here is what I have tried. Can someone point out where I've gone wrong? I am running Fedora Core 5, Apache 2.2.2. Thanks!
<VirtualHost *:80> ServerName www.depaulacs.org ServerAlias depaulacs.org ServerAdmin phorst@speakeasy.net DocumentRoot /var/www/html ErrorLog logs/error_log CustomLog logs/access_log common RewriteEngine on RewriteRule ^/$ /blog/ [R] </VirtualHost>
<VirtualHost *:80> ServerName www.sklar-blake.com ServerAlias sklar-blake.com ServerAdmin phorst@speakeasy.net DocumentRoot /var/www/html/tom ErrorLog logs/www.sklar-blake.com-error_log CustomLog logs/www.sklar-blake.com-access_log common </VirtualHost>
On Thu, 2006-08-03 at 22:36 -0500, Peter Horst wrote:
Hi, I am trying to redirect traffic from the root address at my default server (of two name-based virtual hosts) to /blog/. I.e. I would like traffic for www.depaulacs.org/ to go automatically to www.depaulacs.org/blog/. But I don't want to affect anything to do with the second virtual host. Here is what I have tried. Can someone point out where I've gone wrong? I am running Fedora Core 5, Apache 2.2.2. Thanks!
It appears to be working. If you've solved it, it'd be worth saying so, and what you did. If it's not working for you, there might be another problem you want to sort out.
Tim wrote:
On Thu, 2006-08-03 at 22:36 -0500, Peter Horst wrote:
Hi, I am trying to redirect traffic from the root address at my default server (of two name-based virtual hosts) to /blog/. I.e. I would like traffic for www.depaulacs.org/ to go automatically to www.depaulacs.org/blog/. But I don't want to affect anything to do with the second virtual host. Here is what I have tried. Can someone point out where I've gone wrong? I am running Fedora Core 5, Apache 2.2.2. Thanks!
It appears to be working. If you've solved it, it'd be worth saying so, and what you did. If it's not working for you, there might be another problem you want to sort out.
Thanks much for the follow-up. I let it drop after not getting responses (it happens, right?) . Turns out there was no problem to begin with - near as I can figure, I just had a dirty browser cache that was messing things up (i.e. not actually submitting requests to the server where they could be redirected, just serving the old page). Duh on me!
On Sat, 2006-08-05 at 12:46 -0500, Peter Horst wrote:
Thanks much for the follow-up. I let it drop after not getting responses (it happens, right?).
You're welcome. Yes, it does happen. Sometimes nobody has any suggestions to offer. Sometime one message in the hundreds just doesn't get noticed...
Turns out there was no problem to begin with - near as I can figure, I just had a dirty browser cache that was messing things up (i.e. not actually submitting requests to the server where they could be redirected, just serving the old page).
That could be indicative of a caching *problem* (i.e. not just your browser), possibly due to expiry headers. Since you're running a server, or managing one at least, you might want to read the Apache documents about mod expiry, and some "net-friendly" website information about proxies and caching. Sorry, I don't have a URI handy, but there's a few sites around that cover it.