I installed LAMP on my droplet and then I followed this tutorial: https://www.digitalocean.com/community/tutorials/how-to-set-up-mod_rewrite and I used the contents for the file from my old web hosting, so I know it works: RewriteEngine On RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule ^(.*)$ $1.php [L,QSA]
However, if I enter for example http://cyan.red/index it comes up with: Not Found
The requested URL /index was not found on this server.
These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.
By default the LAMP install will disable usage of the
.htaccess
file.You need to edit the configuration file for your virtual host.
Change the
<VirtualHost>
directive to look something like this. The important part isAllowOverride All
, as this tells Apache that the directory can override default settings using a.htaccess
file.Now make sure the website is enabled.
Also make sure that the rewrite mod is enabled.
Now restart Apache
By default the LAMP install will disable usage of the
.htaccess
file.You need to edit the configuration file for your virtual host.
Change the
<VirtualHost>
directive to look something like this. The important part isAllowOverride All
, as this tells Apache that the directory can override default settings using a.htaccess
file.Now make sure the website is enabled.
Also make sure that the rewrite mod is enabled.
Now restart Apache
By default the LAMP install will disable usage of the
.htaccess
file.You need to edit the configuration file for your virtual host.
Change the
<VirtualHost>
directive to look something like this. The important part isAllowOverride All
, as this tells Apache that the directory can override default settings using a.htaccess
file.Now make sure the website is enabled.
Also make sure that the rewrite mod is enabled.
Now restart Apache
By default the LAMP install will disable usage of the
.htaccess
file.You need to edit the configuration file for your virtual host.
Change the
<VirtualHost>
directive to look something like this. The important part isAllowOverride All
, as this tells Apache that the directory can override default settings using a.htaccess
file.Now make sure the website is enabled.
Also make sure that the rewrite mod is enabled.
Now restart Apache
By default the LAMP install will disable usage of the
.htaccess
file.You need to edit the configuration file for your virtual host.
Change the
<VirtualHost>
directive to look something like this. The important part isAllowOverride All
, as this tells Apache that the directory can override default settings using a.htaccess
file.Now make sure the website is enabled.
Also make sure that the rewrite mod is enabled.
Now restart Apache
By default the LAMP install will disable usage of the
.htaccess
file.You need to edit the configuration file for your virtual host.
Change the
<VirtualHost>
directive to look something like this. The important part isAllowOverride All
, as this tells Apache that the directory can override default settings using a.htaccess
file.Now make sure the website is enabled.
Also make sure that the rewrite mod is enabled.
Now restart Apache
By default the LAMP install will disable usage of the
.htaccess
file.You need to edit the configuration file for your virtual host.
Change the
<VirtualHost>
directive to look something like this. The important part isAllowOverride All
, as this tells Apache that the directory can override default settings using a.htaccess
file.Now make sure the website is enabled.
Also make sure that the rewrite mod is enabled.
Now restart Apache
By default the LAMP install will disable usage of the
.htaccess
file.You need to edit the configuration file for your virtual host.
Change the
<VirtualHost>
directive to look something like this. The important part isAllowOverride All
, as this tells Apache that the directory can override default settings using a.htaccess
file.Now make sure the website is enabled.
Also make sure that the rewrite mod is enabled.
Now restart Apache
By default the LAMP install will disable usage of the
.htaccess
file.You need to edit the configuration file for your virtual host.
Change the
<VirtualHost>
directive to look something like this. The important part isAllowOverride All
, as this tells Apache that the directory can override default settings using a.htaccess
file.Now make sure the website is enabled.
Also make sure that the rewrite mod is enabled.
Now restart Apache
By default the LAMP install will disable usage of the
.htaccess
file.You need to edit the configuration file for your virtual host.
Change the
<VirtualHost>
directive to look something like this. The important part isAllowOverride All
, as this tells Apache that the directory can override default settings using a.htaccess
file.Now make sure the website is enabled.
Also make sure that the rewrite mod is enabled.
Now restart Apache