Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

256
Vistas
How to do this Apache mod-rewrite redirect transparently

I have this redirect (in Apache 2.4 VirtualHost *:80 configurations), which redirects example.com over to example.com/api/ (subfolder) and it works flawlessly. Once I enter http://example.com into the browser, it takes me directly to http://example.com/api/.

RewriteEngine On
RewriteCond %{REQUEST_URI} ^/$
RewriteRule (.*) /api$1 [R,L]

Now, what I need is for this to work transparently. I want http://example.com/api to load directly on the root domain: http://example.com

I've tried all kinds of suggestions I found on the internet, but nothing that would hide/mask the subfolder from the final URL that shows in the browser.

I would appreciate someone's help.

over 4 years ago · Santiago Trujillo
1 Respuestas
Responde la pregunta

0

I figured there is an easier solution to this. I am running my app on a Tomcat server behind Apache and thus adding the following to Apache rules into VirtualHost config fixed the issue with subfolder transparency.

ProxyAddHeaders off
ProxyPass / http://server-host-for-example-com:8080/connect/
ProxyPassReverse / http://server-host-for-example-com:8080/connect/
over 4 years ago · Santiago Trujillo Denunciar
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda