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

373
Vistas
.htacces rewrite all to index / ignore images and css files

I use the following .htaccess file to send all my requests to the index file. But now I would like to ignore everything that comes from the /static folder.

RewriteEngine on
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule . index.php [L]

So here's the thing:

- index.php
- static/
----img
--------bg.jpg
----css
--------main.css

Currently it is so that on subpages of the style and the images can no longer be loaded. And I would like to renounce the use of complete paths.

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

0

You may try this rule:

RewriteEngine on

RewriteCond %{THE_REQUEST} !/static/ [NC]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^ index.php [L]

Using THE_REQUEST is preferred for negative conditions as THE_REQUEST variable is not overwritten with other rules.

over 4 years ago · Santiago Trujillo Denunciar

0

Well, you need to add an exception, right?

RewriteEngine on
RewriteCond %{REQUEST_URI} !^/static/
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^ index.php [L]
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