Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

367
Views
.htacces reescribe todo para indexar/ignorar imágenes y archivos css

Uso el siguiente archivo .htaccess para enviar todas mis solicitudes al archivo de índice. Pero ahora me gustaría ignorar todo lo que viene de la carpeta /static .

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

Así que aquí está la cosa:

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

Actualmente es así que en las subpáginas del estilo ya no se pueden cargar las imágenes. Y me gustaría renunciar al uso de caminos completos.

over 4 years ago · Santiago Trujillo
2 answers
Answer question

0

Puedes probar esta regla:

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

Se prefiere usar THE_REQUEST para condiciones negativas, ya que la variable THE_REQUEST no se sobrescribe con otras reglas.

over 4 years ago · Santiago Trujillo Report

0

Bueno, necesitas agregar una excepción, ¿verdad?

 RewriteEngine on RewriteCond %{REQUEST_URI} !^/static/ RewriteCond %{REQUEST_FILENAME} !-f RewriteRule ^ index.php [L]
over 4 years ago · Santiago Trujillo Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!