On Thu, 5 Feb 2009 22:45:52 +0100, David Welton wrote > > I'm running a development website on an apache2 > > instance tied to the port 8080. The website uses an error handler > > tied to the 404 error code in order to intercept some old urls > > and remap them to the new pages via the http protocol and > > the 'header redirect' command. This works on the server > > Why not use mod_rewrite for this? Or even plain old mod_alias. For > instance: > > <Directory /www/dedasys.com/dedasys> > Redirect permanent /articles > http://www.welton.it/articles Redirect permanent /davidw http://www.welton.it/davidw > Redirect permanent /freesoftware http://www.welton.it/freesoftware >
The aliases are in a database. I have some plan to extend this mechanism to some dynamical content on the website. I don't have experience with mod_rewrite, would it help with a database? > > As a consequence the command 'makeurl' (a quite simple > > wrapper of ap_construct_url) builds a wrong url and the > > requests are redirected to the wrong webserver. 'ap_construct_url' > > code is very simple too and left me clueless about the > > reason for this. I googled this problem but found out nothing. > > > any idea? Is the core mishandling the error? > > Seems weird... Can you create a test case for it? It is. Do you want me to add a new test in the test suite? Actually it should be simple: change the port of your apache server, add the line ErrorDocument 404 /errorscript.tcl errorscript.tcl loads the environment and logs its variables somehere. Run your browser and peek some page that doesn't exist. I still have to test it outside of a VirtualHost definition, that's a degree of freedom i haven't tested yet. Anyway apache is supposed to put the right port even in the case of a Virtual Host. > > > > > P.S. I also noticed that, after works on the server this list > > has been renamed as rivet-cvs. David, should we signal this to > > the infrastructure? > > Looks like rivet-dev here. > same for me now, but I swear, before i sent my message the list webpages had 'cvs' where 'dev' used to be. -- Massimo --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
