https://issues.apache.org/bugzilla/show_bug.cgi?id=54580
--- Comment #28 from Erwann Abalea <[email protected]> --- (In reply to comment #26) > Eric, > > Its not invalid. If someone requests /foobar/ and the redirect URL is > 'example.com', then Apache should be putting 'example.com' and '/foobar/' > together, to make 'example.com/foobar/. Instead, Apache leaves out the > forward-slash at the beggining of 'foobar' resulting in 'example.comfoobar'. > > How is this not a bug? It's the intended purpose. But you fail to read the documentation and normative documents. The directive: Redirect / http://example.com is to be read like this: if the request starts with a '/' (did you notice the first argument? you don't mention it, but it's here), then strip this leading '/' and add what remains to the end of "http://example.com". With such a directive and your example (/foobar/), then yes, the result will be a redirect to "http://example.comfoobar/" which probably won't work (it may work, depending on your network configuration). If what you want is redirect everything from "http://nikolaskallis.com" to "https://nikolaskallis.com", then you can use either one of (probably non exhaustive list): Redirect / https://nikolaskallis.com/ RedirectMatch (.*) https://nikolaskallis.com$1 RewriteRule ^(.*)$ https://nikolaskallis.com$1 [redirect=301] Your first PHP pseudocode didn't work (see comment 20). Your second PHP pseudocode don't allow to perform the following kind of redirection: Redirect /documents/lang/en/ /lang.en. -- You are receiving this mail because: You are the assignee for the bug. --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
