Hello

It works with :

>  rewrite ^(/.*)\.html  https://$host/$1 permanent;


Thank you :) 


Envoyé de mon iPhone

> Le 24 juil. 2018 à 08:49, Aleksandar Lazic <[email protected]> a écrit :
> 
> Hi.
> 
>> On 20/07/2018 11:16, -- wrote:
>> Hello,
>> 
>> In fact I just want the display of the .html extension on my site no longer 
>> displayed
>> 
>> I use haproxy with Nginx, I can make url rewrite with Nginx that works well:
>> 
>> server {
>> rewrite ^(/.*)\.html(\?.*)?$ $1$2 permanent;
> 
> How about to use this in the rewrite?
> 
>  rewrite ^(/.*)\.html(\?.*)?$ https://$host/$1$2 permanent;
>  
>> index index.html;
>> try_files $uri.html $uri/ $uri =404;
>> }
> 
> Best regards
> Aleks
> 
>> But since Nginx runs on port 8889 (on the same machine as Haproxy) it
>> redirects me to this port and I lose the connection (haproxy is
>> listening on port 443)
>> 
>> I wish to do this with Haproxy, is it possible?
>> 
>> example:
>> 
>> https://site.com/index.html -> https://site.com/index (the resource without 
>> the .html does not exist but i want it to be displayed like this in the 
>> browser)
>> 
>> 
>> Thank you
>> 
>> Envoyé de mon iPhone
>> 
>>> Le 19 juil. 2018 à 23:48, Aleksandar Lazic <[email protected]> a écrit :
>>> 
>>> Hi.
>>> 
>>>> On 19/07/2018 15:09, -- wrote:
>>>> Hello,
>>>> 
>>>> Je souhaite supprimer l’extension présentée par mon serveur nginx mais
>>>> depuis Haproxy
>>>> 
>>>> Type
>>>> 
>>>> A.com/index.html en A.com/index
>>>> 
>>>> Est ce possible ?
>>> 
>>> Maybe, but please can you ask in English, thanks.
>>> 
>>> But let me try to interpret you question.
>>> 
>>> reqrep ^([^\ :]*)\ /index.html     \1\ /index
>>> 
>>> https://cbonte.github.io/haproxy-dconv/1.8/configuration.html#4.2-reqrep
>>> 
>>>> Merci
>>>> 
>>>> Envoyé de mon iPhone
>>> 
>>> Best regards
>>> Aleksg

Reply via email to