Skip to content

URL's redirecting to main page #3743

Open
Open

Description

@Prinkels22

Code of Conduct

Submission validity

  • This is not a personal support request, that should be posted on discussions community.
  • I checked current issues and this request isn't a duplicate of an existing issue, opened or closed.

Self troubleshooting

Version

1.9.2

Description

So, i installed yourls on a subdomain of one of my domains and it worked but when i reinstalled it on a new domain and make a short url it just redirects to the main page where you can make a url

Expectation

No response

Reproduction steps

No response

Context

No response

Activity

  1. dgw commented on Mar 27, 2024

    @dgw
    Member

    This sounds like a misconfiguration.

    I'm not sure how you expect anyone to help without details. The YOURLS version alone doesn't pinpoint anything, and the described behavior is what happens when YOURLS doesn't recognize a shorturl keyword. It could also be caused by a plugin.

  2. Prinkels22 commented on Mar 27, 2024

    @Prinkels22
    Author

    So, this happends when with every short url either old one new one or even the created one's from yourls itself and it worked on a subdomain on of mine domains and when i reinstalled everything on the new domain it didnt work anymore but i can delete all plugins maybe it works then, and yes the url's are in the database too

  3. Prinkels22 commented on Mar 27, 2024

    @Prinkels22
    Author

    here are the debug logs when i make a url
    Connected to database tinyd_it on localhost SQL perform: SELECT option_name, option_value FROM yourls_options WHERE 1=1 (0.00087 s) Check for new version: no SQL perform: SELECT timestampFROM yourls_url WHEREip= 'IP' ORDER BYtimestampDESC LIMIT 1 (0.00174 s) SQL perform: SELECT * FROMyourls_urlWHEREurl= 'https://pringelsdc.de' (0.00040 s) SQL perform: SELECT * FROMyourls_urlWHEREkeyword= '1' (0.00051 s) SQL perform: UPDATE yourls_options SET option_value = '2' WHERE option_name = 'next_id' (0.00106 s) SQL perform: INSERT INTOyourls_url (keyword, url, title, timestamp, ip, clicks) VALUES('' '' '' '' '' 0); (0.00354 s)

    and here when accesing the shorten link

    Connected to database tinyd_it on localhost SQL perform: SELECT option_name, option_value FROM yourls_options WHERE 1=1 (0.00231 s) Check for new version: no

    Turns out every link redirects to the main page so i probably broke something haha

  4. dgw commented on Mar 28, 2024

    @dgw
    Member

    My guess is an error in the server configuration, that isn't passing the keyword along properly. If YOURLS doesn't recognize a keyword, it redirects to YOURLS_SITE:

    YOURLS/yourls-go.php

    Lines 26 to 27 in 43c5855

    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

  5. Alexander6766 commented on Aug 11, 2024

    @Alexander6766

    Hello,

    I’m experiencing the same issue where old links work in the application, but all new links redirect to the homepage. I tried completely reinstalling the application on different hosting, but the problem persists. After installation, the application has 3 pre-created links that redirect correctly. However, when I create links myself, they only redirect to the homepage.

    Thank you in advance for your help in resolving this issue.

  6. ozh commented on Aug 12, 2024

    @ozh
    Member
  7. amnya commented on Nov 23, 2024

    @amnya

    Hello, did you get this issue resolved? The same is happening with my installation though my configurations seem to be correct.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions