I am trying to set up Magento behind a reverse proxy and I have run into an issue. The URI path for the store is not the same as the file system path on the server. When Magento tries to redirect to a secure URL, it uses the file system path instead of the URI path.
Store is located at: http://www.foobar.com/baz/ecommerce/, which on the filesystem is in the directory DOCUMENT_ROOT/12345/
12345 is the id of the ‘baz’ store and a reverse proxy server(mod_rewrite) handles the details.
If I click on the “Login” link, it tries to redirect to https://www.foobar.com/12345/customer/account/ instead of https://www.foobar.com/baz/ecommerce/customer/account/
So, it’s using the real file system path, instead of the ‘web/secure/base_path’ in core_config_data
My first question is: Is this a bug? seems to me like it should use the ‘web/secure/base_path’.
Second question: Where in the code is that redirect happening so I can mess with it?