Alan Burlison wrote:
Scott Rotondo wrote:

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.

We know about mod_rewrite, we already use it extensively. Your example assumes there is a 1:1 mapping from pages in the current portal to the ones in xwiki, and there isn't. It also assumes that the target page of the redirect is accessible as a file on the machine doing the redirect, and in our case it isn't. The target pages are not on the same machine and the pages are not stored in a filesystem.

We can and will be doing redirects, but the environment we have to do them in is significantly more complex than your demo. A lot of the "Why don't you just..." suggestions we've had would work fine in an environment where we were serving up static http pages via Apache, but unfortunately we aren't in that sort of environment.

Thanks for your response and for your willingness to engage in a semi-technical discussion. This is a lot more useful than "it can't be done and we won't tell you why."

Indeed, your response reveals a constraint that was probably obvious to you from the beginning but not to me, namely the following:

C1. Pages are generated dynamically, and there may be no filesystem object corresponding to a valid URL.

Speaking of hidden assumptions, it's worth explicitly stating that my implementation was designed to satisfy two requirements (admittedly without satisfying the unknown constraint above):

R1. Existing URL's should be redirected to the corresponding page in the new hierarchy if the new URL is valid.

R2. Pages that do not exist in the new hierarchy should be redirected to the top-level page for their community or project.

While I suppose others could disagree, in my opinion R1 is *much* more important than R2. Here's why this matters: If we drop requirement R2, I think you'll agree that it's trivial to satisfy R1 (even in the presence of constraint C1) using mod_rewrite or even using the simpler mod_alias.

I'd be perfectly happy to have invalid URL's return 404 or a generic "not found" page if we can continue to correctly serve the valid URL's we have published in countless places.

        Scott

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

Reply via email to