How to configure .htaccess in easyengine?

I was install my php website in easyengine but some url have not found. The url have .html still normal but in case .php and etc having error. like this

https://www.stafaban.cf/collections/lirik-chord-1-800-273-8255-feat-alessia-cara-khalid-logic-torrent.php

EasyEngine does not contain Apache. You need to learn how to use Nginx rules. You may use simple converter: http://labs.gidix.de/nginx/

1 Like

where i put the result code ?

The settings for each site are stored in the folder /etc/nginx/sites-available . They include various default settings, which are typically sufficient for standard CMS and also custom rules that can be placed in the folder: /var/www/example.com/conf/nginx/

But in your case you are just trying to use weird addresses for your website with PHP extension. EasyEngine first looks for a file with the PHP extension and if you can not find, gives a 404 error.

So how to fix it ?

You need to write your own rules for your CMS.

If you created the site with easyengine like this:

ee site create stafaban.cf --php (or --mysql)

Then you might do this to make it work for your CMS:

ee site edit stafaban.cf

Now, remove the line

include common/php.conf;

and replace it with these lines

location / {
  try_files $uri $uri/ /index.php?$args;
}
location ~ \.php$ {
  try_files $uri $uri/ =404;
  include fastcgi_params;
  fastcgi_pass php;
}

Note: if you were using php7.0 then replace fastcgi_pass php; with fastcgi_pass php7;

Save with Ctrl+x then Y and test your site…

1 Like

Thanks

So did you implement this? It does not seem to work for your original link https://www.stafaban.cf/collections/lirik-chord-1-800-273-8255-feat-alessia-cara-khalid-logic-torrent.php