On Saturday, November 3, 2012 6:55:42 PM UTC+1, marcelh19242 wrote:
> Hi,
> I'm having exactly the same problem atm.
> I'm currently trying to solve it with this bundle:
> https://github.com/frosas/BaseUrlBundle
> but it does not work yet.
> I think, that these two pull-requests for Symfony2.2 are also dealing with:
> https://github.com/symfony/symfony/pull/3958
> https://github.com/symfony/symfony/pull/3865
> I tryed the current 2.2-dev but it made no change . . .
> On Monday, October 29, 2012 10:24:40 PM UTC+1, chiborg wrote:
>> I have a rewrite rule that converts requests to
>> https://ssl.example.com/name/foo as a proxy request to
>> http://name.example.com/foo
>> it looks like this:
>> RewriteMap domaindb txt:/etc/apache2/ssldomains
>> RewriteRule ^/www\.([^/]+)/(.*)
>> /${domaindb:$1|%{HTTP_HOST}/$1}/$2 [S=2]
>> RewriteRule ^/([^/]+)/(.*)
>> /${domaindb:$1|%{HTTP_HOST}/$1}/$2 [S=1]
>> RewriteRule ^/(.+) /$1/ [R,L]
>> RewriteRule ^/(.*) http://$1 [P,L]
>> The RewriteMap maps "name" to "name.example.com"
>> I see that HTTP_X_FORWARDED_FOR, HTTP_X_FORWARDED_HOST
>> and HTTP_X_FORWARDED_SERVER are set.
>> Unfortunately the base url stays the same, so all generated urls are
>> wrong. What's the best way to avoid this?
>> My best idea at the moment is to write an event handler
>> for onEarlyKernelRequest, execute it after the
>> original onEarlyKernelRequest handler from RouterListener.
>> Another way would be to write my own Request class and use it instead of
>> the original class. I'm not sure if that's the right way.
>> Or maybe there is another server configuration that allows for BOTH
>> subdomains (without SSL) and subfolders (with SSL, all on the same
>> subdomain)?