Please upgrade here. These earlier versions are no longer being updated and have security issues.
HackerOne users: Testing against this community violates our program's Terms of Service and will result in your bounty being denied.
404 Site - Where and under which file name?
phreak
MVP
Hi everbody,
Sorry, it might come a little stupid, but i actually don't know where i should place my 404.php or filenotfound.php to make it appear.
I found it in the routes called /dahsboard/home/.
But this folder doesn't exist under dashboard... Mmh. Any ideas.
- VanillaAPP | iOS & Android App for Vanilla - White label app for Vanilla Forums OS
- VanillaSkins | Plugins, Themes, Graphics and Custom Development for Vanilla
Tagged:
0
Comments
you could leave the route as it it was configured for default404 which was
as so in conf/config.php
$Configuration['Routes']['Default404'] = array('dashboard/home/filenotfound', 'NotFound');
by default it resides in applications/dashboard/views/home
edited:
see Businessdad's comment below as to where to place your copy of filenotfound.php .
I may not provide the completed solution you might desire, but I do try to provide honest suggestions to help you solve your issue.
To avoid your page being overwritten, you can just place filenotfound.php in your theme folder. Put it into you_theme_folder/views/home, Vanilla will pick it up automatically.
My shop | About Me
You could also use the Bonk/404 plugin and route it as well
$Configuration['Routes']['Default404'] = 'plugin/Bonk'
❌ ✊ ♥. ¸. ••. ¸♥¸. ••. ¸♥ ✊ ❌
Interesting question which I should have googled for : If you make a custom route in the dashboard, let's say 'UnderDog', does that show up in the config.php somehow?
There was an error rendering this rich post.
@UnderDog all my internal routes show up in my config.php with seemingly random key names. E.g.
Search first
Check out the Documentation! We are always looking for new content and pull requests.
Click on insightful, awesome, and funny reactions to thank community volunteers for their valuable posts.
@businessdad: this doesn't seem to work, i still get BONKs. ;(
Thank you all for your responses.
Bonk and 404 are two different things. Do you know the reason for the bonk?
My shop | About Me
@phreak You should put it in the forum folder that way it becomes an internal url and you can use :
$Configuration['Routes']['Default404'] = '/filenotfound.php '
I have added several pages like this and routed them and works fine.
❌ ✊ ♥. ¸. ••. ¸♥¸. ••. ¸♥ ✊ ❌
That's true, but I'm sure that even just copying the file works, I do it all the time. Let's see what's the reason for the bonk.
My shop | About Me
I think it has to do with how the url is written in that part. I tried routing it to an external 404 I had made for my main site and kept getting bonked. Finally I just added that file to the forum folder and it worked. This or a plugin page seem to be the best solution for me.
$Configuration['Routes']['Default404'] = '/404.html '
❌ ✊ ♥. ¸. ••. ¸♥¸. ••. ¸♥ ✊ ❌
OK, i also tried this route to a direct file in the root folder of my forum. I also tried that... and this time i get a Fatal Error.
Weird weird...
Fatal error: Allowed memory size of 67108864 bytes exhausted (tried to allocate 71 bytes) in /www/htdocs/w00fd8ae/library/core/class.dispatcher.php on line 486
That just means you are running out of memory. You should go into the php.ini and increase the maximum memory available to PHP. The parameter is called
memory_limit
. I usually set it to256M
, which should be enough for most websites.Edit: here's a bit of a tutorial about it: 3 Ways to Increase PHP Memory Limit.
Clarification: earlier I wrote "That's a PHP issue", but I meant "it's an issue related to PHP". There's nothing wrong with PHP itself.
My shop | About Me
Try doing that using an html file. anything , it could be your php file has an error, using an html file to test this method first, if it works then the issue is your file.
❌ ✊ ♥. ¸. ••. ¸♥¸. ••. ¸♥ ✊ ❌
I think your error has nothing to do with memory exhaustion - it is a result of the redirect looping and exhaustion - They used to call them rabbits - programs that looped till you ran out of memory.
Are you getting bonks because of trying to add a 404 page - page not found.
or are you getting bonks from something else.
Clarification - needs to be made for people to troubleshoot.
I may not provide the completed solution you might desire, but I do try to provide honest suggestions to help you solve your issue.
I learned a new term today. It goes well with the old "abend" of old mainframe times.
My shop | About Me
you could also copy the contents of said file into this plugin and save yourself the troubles ?
http://vanillaforums.org/addon/bonk-plugin
❌ ✊ ♥. ¸. ••. ¸♥¸. ••. ¸♥ ✊ ❌
until Phreak clarifies the issue - he is working with 404 file not found (not a bonk error). His attempted change to 404 resulted in a bonk. He was bonk free until he tried to change the 404 result.
so he needs simplify not complicate.
I may not provide the completed solution you might desire, but I do try to provide honest suggestions to help you solve your issue.
He wants to replace the original filenotfound with his custom one , I understand that.
He wants his own custom 404 bonk and adding it in the routes is bonking him out,no?
He is getting bonked with his bonk ....
this is what my bonk page looks link in config.php, However in the dashboard I only entered plugin/Bonk instead of the default 404. Before that I had an 404.html same idea but without the benefits of the plugin...Maybe if you copy this link and just replace the relevant parts like the url
$Configuration['Routes']['Default404'] = 'a:2:{i:0;s:11:"plugin/Bonk";i:1;s:8:"NotFound";}';
❌ ✊ ♥. ¸. ••. ¸♥¸. ••. ¸♥ ✊ ❌
@vrijvlinder
bonk = error
404 = file not found
two different issues.
@phreak
read this
http://vanillaforums.org/discussion/comment/177746/#Comment_177746
then we can stop guessing whether you are trying to change bonk page or 404 page.
I may not provide the completed solution you might desire, but I do try to provide honest suggestions to help you solve your issue.
looks like either he changed the definitions or found the page.
I may not provide the completed solution you might desire, but I do try to provide honest suggestions to help you solve your issue.