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

535
Vistas
.htaccess not working in digital ocean server

When I use the .htaccess as followed, I am getting The requested URL was not found on this server error. My configurations are as

Digitalocean: var/www/html/my_site/.htaccess as

<IfModule mod_rewrite.c>
  # Rules to serve URLs which point to files directly
  # ----------
  RewriteEngine On
  RewriteBase /
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule ^(.*)$ index.php/$1 [L]
</IfModule>

I changed /etc/apache2/apache2.conf from

<Directory /var/www/>
    Options Indexes FollowSymLinks
    AllowOverride None
    Require all granted
</Directory>

To

<Directory /var/www/>
    Options Indexes FollowSymLinks
    AllowOverride All
    Require all granted
</Directory>

The file /etc/apache2/mods-enabled/dir.conf as

<IfModule mod_dir.c>
   DirectoryIndex index.php index.html index.cgi index.pl index.xhtml index.htm
</IfModule>

I changed myapp\application\config\config.php as $config['index_page'] = ''; and $config['uri_protocol'] = 'REQUEST_URI';

And I have run the following commands in my digitalocean server

sudo a2enmod rewrite
sudo service apache2 reload

When I opening my_site in browser, after done all this I am getting the following message Not Found

If I remove the .htaccess and reset myapp\application\config\config.php as $config['index_page'] = 'index.php'; It is working. So pls help.

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

0

It should be like this

<Directory /var/www/html/my_site/>
    Options Indexes FollowSymLinks
    AllowOverride All
    Require all granted
</Directory>
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