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

750
Views
Eliminar index.php del proyecto codeigniter en localhost y servidor apache

Tengo un proyecto en CodeIgniter que estoy ejecutando en mi máquina local en LocalHost. Tengo que usar http://localhost/projectname/index.php/controller/function para ejecutar mis API. Quiero acceder a la misma URL pero sin incluir index.php en la URL.

Anteriormente tenía instalado XAMPP y estaba usando su carpeta htdocs y todo funcionaba según lo requerido. Pero ahora lo desinstalé y configuré manualmente Apache 2.4, PHP 8 y MySQL 8. Después de hacerlo, aparece este problema.

Soy nuevo en la configuración manual de servidores y CodeIgniter. Por favor, ayúdame a solucionar esto y, si es posible, da una razón por la que esto sucede, me ayudará a aprender.

over 4 years ago · Santiago Trujillo
1 answers
Answer question

0

Agregue un .htaccess en el directorio raíz y luego agregue las siguientes reglas al archivo .htaccess

 <IfModule mod_rewrite.c> RewriteEngine on RewriteCond $1 !^(index\.php|resources|robots\.txt) RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule ^(.*)$ index.php/$1 [L,QSA] </IfModule>

Luego busque el siguiente archivo en su aplicación. La ruta del archivo es application/config/config.php. En este archivo encuentra debajo el código

 $config['index_page'] = 'index.php';

Cambie esa línea como se muestra a continuación.

 $config['index_page'] = '';

Ahora intente abrir URL sin index.php.

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!