Since we've had so much speculation about whether it is feasible or not
to redirect URL's from the old os.org structure to the new one, I
decided to put together a sample implementation. I enabled apache on my
desktop system, vinifera.sfbay [1], and added the following rules to
httpd.conf:
DocumentRoot /export
RewriteEngine on
RewriteCond /export/redirected/$1 -f
RewriteRule ^/old/(.*) /redirected/$1 [R=permanent]
RewriteRule ^/old/(.*) /redirected/ [R]
That's it. Attempts to access anything under http://vinifera.sfbay/old
are redirected to the corresponding location under
http://vinifera.sfbay/redirected if the page exists. Pages that do not
exist are redirected to the top-level http://vinifera.sfbay/redirected.
Try the following examples:
http://vinifera.sfbay/old/page1.html
[goes to http://vinifera.sfbay/redirected/page1.html]
http://vinifera.sfbay/old/page2.html
[goes to http://vinifera.sfbay/redirected/page2.html]
http://vinifera.sfbay/old/notfound.html
[goes to http://vinifera.sfbay/redirected]
Just change "old" and "redirected" in the rules above to the old and new
locations for an opensolaris.org directory hierarchy, and you're done.
Scott
[1] My apologies to readers outside Sun. This system is only accessible
from SWAN, but I'm sure you get the idea.
--
Scott Rotondo
Principal Engineer, Solaris Security Technologies
President, Trusted Computing Group
Phone/FAX: +1 408 850 3655 (Internal x68278)
_______________________________________________
website-discuss mailing list
[email protected]