404 with permalinks - and prefix URL.
3 posts by 2 authors in: Forums > CMS Builder: Plugins & Add-ons
Last Post: August 21, 2019 (RSS)
By Toledoh - August 19, 2019
Hi guys.
I've built a custom 404 page and trying to display it while the page is still staged. I've edited permalinks.php to read
$GLOBALS['PERMALINKS']['404_not_found_filepath'] = __DIR__ .'/404/'; // filepath to include if Permalink isn't found
changed to various versions of than
$GLOBALS['PERMALINKS']['404_not_found_filepath'] = __DIR__ .PREFIX_URL. '/404/'; // filepath to include if Permalink isn't found
Any suggestions? If a problem I can move that file to the permalinks folder, but Id rather keep it in the root.
I currently get the error: Notice: Couldn't find filepath for 404 page: '/home/stmarysbundaberg/public_html/cmsb/plugins/permalinks/~stmarysbundaberg/404/'! in /home/stmarysbundaberg/public_html/cmsb/plugins/permalinks/permalinks.php on line 279
Tim (toledoh.com.au)
By Steve99 - August 21, 2019
Hi Tim,
There's a string you can set in "permalinks_notFound404.php" for a separate custom 404 page:
### If you already have a 404 page you want to use just change the URL below and uncomment it the line
//$alternate404Url = "http://www.example.com/some-other-404-page.php";
Or you could style the html in that file itself.
Hope this helps!
Best,
Steve