From: SourceForge.net <no...@so...> - 2006-07-07 20:47:47
|
Bugs item #902242, was opened at 2004-02-22 20:34 Message generated for change (Comment added) made by cito You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=104866&aid=902242&group_id=4866 Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: WebKit Group: None >Status: Closed >Resolution: Fixed Priority: 5 Submitted By: Nobody/Anonymous (nobody) Assigned to: Nobody/Anonymous (nobody) Summary: URLParser messes up 301s through mod_rewrite Initial Comment: I've been porting my site to WK CVS. I've found one issue with the combination of mod_rewrite rules and the new URLParser class. I am doing the standard /wk/ rewrite for the top level: RewriteRule ^(.*) /wk/ [L,PT] Now, say that I have a servlet at http://example.com/directory/index (in reality in /wk/directory/index). If I request: http://example.com/directory/ everything works fine. If instead though, I do an http://example.com/directory (no trailing slash), the URLParser class (line 450 or so), does this: raise HTTPMovedPermanently (webkitLocation=trans.request().urlPath() + "/") That though sends to the client a 301 with a new location of http://example.com/wk/directory/ which in turn Apache changes into http://example.com/wk/wk/directory/ which finally raises a 404. Changing the above URLParser line to: raise HTTPMovedPermanently(location=trans.request ().urlPath() + "/") fixes the problem, but I am not sure if that will break other configs. ---------------------------------------------------------------------- >Comment By: Christoph Zwerschke (cito) Date: 2006-07-07 22:47 Message: Logged In: YES user_id=193957 Fixed in SVN trunk. SCRIPT_URL is evaluated to check for rewritten URLs. Will go into Webware 0.9.2. ---------------------------------------------------------------------- Comment By: Ben Parker (benparker) Date: 2004-02-22 22:10 Message: Logged In: YES user_id=672635 Even under the 0.8.1 release, there are situations where a double /wk can be prefixed by apache during a redirect. How about trying this rewrite rule instead: RewriteCond !^/wk RewriteRule ^(.*)$ /wk [L,PT] Then you'll never have apache adding 2 "/wk" prefixes to the URL, which I think is the real problem here. Regards, Ben ---------------------------------------------------------------------- Comment By: Costas Malamas (cmalamas) Date: 2004-02-22 20:35 Message: Logged In: YES user_id=71233 Sorry, I wasn't logged in; this is co...@ho... ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=104866&aid=902242&group_id=4866 |