Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

URL's redirecting to main page #3743

Open
5 tasks done
Prinkels22 opened this issue Mar 26, 2024 · 4 comments
Open
5 tasks done

URL's redirecting to main page #3743

Prinkels22 opened this issue Mar 26, 2024 · 4 comments
Labels
bug Something isn't working

Comments

@Prinkels22
Copy link

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

@Prinkels22 Prinkels22 added the bug Something isn't working label Mar 26, 2024
@dgw
Copy link
Member

dgw commented Mar 27, 2024

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.

@Prinkels22
Copy link
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

@Prinkels22
Copy link
Author

Prinkels22 commented Mar 27, 2024

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

@dgw
Copy link
Member

dgw commented Mar 28, 2024

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants