{"id":13525386,"url":"https://github.com/joshp23/YOURLS-Update-30X","last_synced_at":"2025-04-01T04:31:55.583Z","repository":{"id":68878207,"uuid":"148919401","full_name":"joshp23/YOURLS-Update-30X","owner":"joshp23","description":"Utility to check for endpoint URL redirections and update the long URL in YOURLS","archived":false,"fork":false,"pushed_at":"2021-03-14T06:20:28.000Z","size":19,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2024-11-02T09:33:45.825Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/joshp23.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2018-09-15T16:28:53.000Z","updated_at":"2024-02-26T23:42:32.000Z","dependencies_parsed_at":"2023-03-01T03:32:06.653Z","dependency_job_id":null,"html_url":"https://github.com/joshp23/YOURLS-Update-30X","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/joshp23%2FYOURLS-Update-30X","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/joshp23%2FYOURLS-Update-30X/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/joshp23%2FYOURLS-Update-30X/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/joshp23%2FYOURLS-Update-30X/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/joshp23","download_url":"https://codeload.github.com/joshp23/YOURLS-Update-30X/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246586087,"owners_count":20801025,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-08-01T06:01:18.238Z","updated_at":"2025-04-01T04:31:55.578Z","avatar_url":"https://github.com/joshp23.png","language":"PHP","funding_links":[],"categories":["Plugins"],"sub_categories":["U"],"readme":"# YOURLS-Update-30X\nUtility to check for endpoint URL redirections and update the long URL in YOURLS\n\n## Features\n- Can work on individual keywords, domain based long url's, or the entire database\n- Returns number of attempts, successes, failures, and an array of unreachable links\n- Indexes the YOURLS_url table when enabled\n- API based to avoid PHP script execution limitation (This can be time consuming)\n\n### Installation\n-  Copy the `update30X` folder into `YOURLS/user/plugins/`\n-  Enable in admin area.\n\n### API\n-  `action=u30X`  \nIf sent alone, this will check the entire table.\n-  `keyword=KEYWORD`  \nUse this to check a single record. Good for testing purposes.  \n-  `domain=EXAMPLE.COM`  \nUse this to restrict the check to a single domain.\n\n### Example Use Case:\nThis plugin was written to manage multiple URL redirects resulting from a Drupal to Wordpress migration.\n-  Convert your data to Wordpress and make use of either the recommended [Redirection](https://wordpress.org/plugins/redirection/) or [Simple 301 Redirects](https://wordpress.org/plugins/simple-301-redirects/) plugin. \n-  Retreive redirect data from the Wordpress database and RegEx the daylights out of that dataset so that redirects can be set up in `.htaccess` with something like the following:\n```\nRewriteCond %{QUERY_STRING} ^(q=node/1234)$  \nRewriteRule ^(.*)$ https://example.com/?p=23 [R=301,L]  \nRewriteRule ^/?node/1234w/? https://example.com/?p=23 [R=301,L]  \n```\n-  Once the redirects are set up, merely run a command like the following:  \n```\n$ curl --data \"format=json\u0026signature=0YOUR0API0KEY\u0026action=u301\u0026domain=example.com\" https://sho.rt/yourls-api.php | python -m json.tool\n\n```\n\n### Note:\nWith a YOURLS URL database of roughly 450 links, this process took roughly 3 minutes. Appx. 10 seconds was shaved off of this time with the table index. Please verify that it has been created before attempting large checks.\n\n### Tips\nDogecoin: DARhgg9q3HAWYZuN95DKnFonADrSWUimy3\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjoshp23%2FYOURLS-Update-30X","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjoshp23%2FYOURLS-Update-30X","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjoshp23%2FYOURLS-Update-30X/lists"}