My former university, SPSU, was "consolidated" into Kennesaw State University. I used to have the domain bbrown.spsu.edu
. As a temporary fix, bbrown.kennesaw.edu
was set up by University IT. However, the permanent home for my web pages should be http://ksuweb/faculty/rbrow211
. I have administrative control of the server with the two "bbrown" domains. I've put the following into httpd.conf
:
<VirtualHost *:80>
ServerName bbrown.spsu.edu
ServerAlias www.bbrown.spsu.edu
RewriteEngine On
RewriteRule ^(.*)$ http://ksuweb.kennesaw.edu/faculty/rbrow211%{REQUEST_URI} [L,R=301]
</VirtualHost>
<VirtualHost *:80>
ServerName bbrown.kennesaw.edu
ServerAlias www.bbrown.kennesaw.edu
RewriteEngine On
RewriteRule ^(.*)$ http://ksuweb.kennesaw.edu/faculty/rbrow211%{REQUEST_URI} [L,R=301]
</VirtualHost>
These two URLs behave as I expect, and redirect to the proper internal page on ksuweb:
http://bbrown.spsu.edu/misc/university_success.html
http://bbrown.kennesaw.edu/misc/university_success.html
However the first one of these works and the second does not! It redirects to the index page at the top level, i.e. to http://ksuweb.kennesaw.edu/faculty/rbrow211/
http://bbrown.spsu.edu/it3203/2016_02/lab_7s.html
http://bbrown.kennesaw.edu/it3203/2016_02/lab_7s.html
but these two, with two levels of directory, work as expected:
http://bbrown.spsu.edu/it3123/2016_02/assign_0_classroom.html
http://bbrown.kennesaw.edu/it3123/2016_02/assign_0_classroom.html
I am utterly baffled. My question? What have I done wrong?
http://bbrown.kennesaw.edu/it3203/2016_02/lab_7s.html
redirects tohttp://ksuweb.kennesaw.edu/faculty/rbrow211/it3203/2016_02/lab_7s.html
). So, this would seem to be a local caching issue (if you've previously experimented with erroneous 301 redirects, then these will have been cached by the browser and possibly any intermediary caches)? The redirect code looks OK. TheRewriteRule
pattern could perhaps be simplified to.*
or even^
- but that won't make any difference in usage.$1
will already contain the slash prefix in this instance.