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.
Options

[Solved] [HowTo] How do I Redirect my 404 page to my site index?*

Mikey05Mikey05 New
edited April 2013 in Vanilla 2.0 - 2.8

Hi everyone.
Is there a option to redirect the error page 404 into index page? I have try thru .htacess with ErrorDocument 404 /index.php but wont work.
Thank you for your help...

Comments

  • Options
    vrijvlindervrijvlinder Papillon-Sauvage MVP

    Can you explain better? you want to route the 404 to a custom 404 page?

    To change routes or add new one you can do that in the dashboard in the Routes section .

  • Options

    No no. Ex: if someone writes mysite.com/page5 if this page dont exists it redirects to error page 404. Now i want that if someone writes the wrong page should be redirected to index page and not to error page 404.

  • Options
    vrijvlindervrijvlinder Papillon-Sauvage MVP

    ok then you would change the routing in the dashboard, instead of going to the 404filenot found you put discussions controller as the route.

    Default404=>discussions=>internal

  • Options
    hgtonighthgtonight ∞ · New Moderator
    edited April 2013

    Dashboard -> Routes -> Default404 -> Edit. Put '/' in for the target to redirect to the home page.

    EDIT - cross post

    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.

  • Options

    Great! Thank you vrijvlinder. You are my HERO :)

  • Options
    vrijvlindervrijvlinder Papillon-Sauvage MVP

    don't forget @hgtonight he is also a Vanilla super hero !

  • Options

    Thank you to hg... I gived him a heart to :)

  • Options
    hgtonighthgtonight ∞ · New Moderator

    Thanks guys!

    Welcome to the community @Mikey05!

    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.

  • Options
    KCallwoodKCallwood New
    edited May 2013

    I have tried every possible way to do this. I have done Dashboard -> Routes -> Default404 -> Edit. Put '/' I have also specified a specific URL instead of just '/' but it still will not reroute the 404 page. Is there anything else I need to do?

  • Options
    phreakphreak Vanilla*APP (White Label) & Vanilla*Skins Shop MVP
    edited May 2013

    Hi, same here.

    Of course you can place a 404.html in your root and write a .htaccess rule like
    ErrorDocument 404 http://www.yoursite.com/404.html

    I also tried to route to the 404.html in "Routes" but this also doesn't work. Also tried to set it into the themes and the default theme folder. But both doesn't work. So i just overwrote the styling in "dashboard/views/home/filenotfound.php.

    But smart is different. Which folder is equivalent to the "home" folder in my "themes"-folder to make it update-save?

    • VanillaAPP | iOS & Android App for Vanilla - White label app for Vanilla Forums OS
    • VanillaSkins | Plugins, Themes, Graphics and Custom Development for Vanilla
  • Options
    vrijvlindervrijvlinder Papillon-Sauvage MVP
    edited May 2013

    @phreak

    You need to make the url internal . Copy the 404.html and put it in the forum directory . Then it becomes an internal file.

    so your route looks like this

    Default404=>forum/404.html=>internal

    depending on what you call your forum of course

  • Options
    vrijvlindervrijvlinder Papillon-Sauvage MVP
    edited May 2013
  • Options

    Hi,

    Is there a way to use Routes to redirect visitors to another URL (another domain) upon a 404 error is triggered?

    Or is there a way to disable the Default404 setting from /dashboard/routes so the ErrorDocument directive from .htaccess works properly again?

    Thanks!

  • Options
    vrijvlindervrijvlinder Papillon-Sauvage MVP

    @AristaP said:

    Hi,

    Is there a way to use Routes to redirect visitors to another URL (another domain) upon a 404 error is triggered?

    Or is there a way to disable the Default404 setting from /dashboard/routes so the ErrorDocument directive from .htaccess works properly again?

    Thanks!

    please look at the Plugin Bonk

Sign In or Register to comment.