Home > Blockchain >  Not Found The requested URL was not found on this server
Not Found The requested URL was not found on this server

Time:11-04

I have an front-end application on apache server. When i go to BASE URL it's fine but if go to (Base URL)/example and refresh this show the next message:

Not Found The requested URL /example was not found on this server.

On my server linux (Centos 7) on /var/www/html have the ".htaccess" file with the next content:

<IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteBase /
    RewriteRule ^index\.html$ - [L]
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule . /index.html [L]
</IfModule>

Somehelp how resolve this ? Thank !

CodePudding user response:

I have the next wrapper <Directory "/var/www/html"> Options Indexes FollowSymLinks AllowOverride None Require all granted </Directory>

It looks like .htaccess overrides are not enabled for the specific directory you have the .htaccess file.

It should be AllowOverride All in the <Directory "/var/www/html"> container.

Then restart Apache for the changes to take effect.

  • Related