Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

143
Visualizações
Safari user agent changing between pages

I have a site that checks the user-agent string and if it changes between pages the user is logged out.

Unfortunately I have a problem where Safari is giving a very slightly different string from one page to the next. This seems only to be happening when I am using a redirect with htaccess though.

90.91.993.92 - - [13/Aug/2021:13:37:41 +0100] "GET /admin/ HTTP/1.1" 200 703 "" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/14.1.2 Safari/605.1.15"
90.91.993.92 - - [13/Aug/2021:13:37:42 +0100] "GET /controller/ HTTP/1.1" 200 1571 "" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/14.1.1 Safari/605.1.15"
90.91.993.92 - - [13/Aug/2021:13:37:42 +0100] "GET /controller/js/controller.js HTTP/1.1" 200 1152 "" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/14.1.2 Safari/605.1.15"

The part that is changing is the version number, on the first page it is Version/14.1.2 but after the redirect it is Version/14.1.1 although notably even requests from the second page (like the JS file) are using Version/14.1.2!

The re-write rule looks like:

RewriteCond %{REQUEST_FILENAME} !-f 
RewriteCond %{REQUEST_FILENAME} !-d 


RewriteRule ^([^/]*)/?([^/]*)/?([^/]*)/?([^/]*)/?$ /controller/?&a=$1&b=$2&c=$3&d=$4 [QSA,L]

So where is Version/14.1.1 and how can htaccess be causing this? Is there a safer way to compare the user agent strings?

over 4 years ago · Santiago Trujillo
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda