Skip to content

Change default root direction and invalid 403 error pages #3533

Answered by dgw
EDIflyer asked this question in Q&A
Discussion options

You must be logged in to vote

Root: Add an index.(php|html) file
Invalid shortlink: This redirects to the root by default.

YOURLS/yourls-go.php

Lines 25 to 27 in fd70f6d

// Either reserved keyword, or no such keyword
yourls_do_action( 'redirect_keyword_not_found', $keyword );
yourls_redirect( YOURLS_SITE, 302 ); // no 404 to tell browser this might change, and also to not pollute logs

Plugins can override the behavior for unrecognized links, e.g. this one that fuzzy-suggests possible matches.

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@EDIflyer
Comment options

Answer selected by EDIflyer
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants