kolber / stacey

Cheap & easy content management
http://staceyapp.com
MIT License
1.04k stars 132 forks source link

404.html vs 404.php #124

Open eroonkang opened 10 years ago

eroonkang commented 10 years ago

On 3.0.0:

Wanted to create 404.php instead of 404.html in /public/ for my install, but realized there's a code bit in stacey.inc.php specifically asking for 404.html. Perhaps this can be changed in the later version?

kolber commented 10 years ago

Hey @eroonkang, 404.html is only the final fallback, it will look for a 404 page and template first. ie. content/404.

Will that let you do what want?

eroonkang commented 10 years ago

I think not, butI'm happy to be proven wrong. Here's what I tried:

  1. Created 404.php in /public, resulting in both 404.php and 404.html to be present in the directory.
  2. Changed ErrorDocument 404 /404.html to ErrorDocument 404 /404.php, in .htaccess.

Somehow, this still displays 404.html, not the php.

And it would still not display the php. Instead, shows your fallback text from stacey.inc.php.

I also tried to change the line 149 and 150, to specifically look for 404.php and while it displays the php, but comments out all the php code.

Am I missing anything? Thanks for help-

desbest commented 4 years ago

Change echo file_get_contents(Config::$root_folder.'public/404.html'); to include(Config::$root_folder.'public/404.html');