Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/tobozo/YOURLS-GeoShortURL
🔗 YOURLS plugin to add per-country support to existing short URLs
https://github.com/tobozo/YOURLS-GeoShortURL
bitly php shorten-urls shorturl url-shortener url-shortner yourls
Last synced: 10 days ago
JSON representation
🔗 YOURLS plugin to add per-country support to existing short URLs
- Host: GitHub
- URL: https://github.com/tobozo/YOURLS-GeoShortURL
- Owner: tobozo
- License: mit
- Created: 2018-09-11T10:22:09.000Z (about 6 years ago)
- Default Branch: master
- Last Pushed: 2024-06-01T10:55:26.000Z (5 months ago)
- Last Synced: 2024-10-24T06:51:17.544Z (19 days ago)
- Topics: bitly, php, shorten-urls, shorturl, url-shortener, url-shortner, yourls
- Language: PHP
- Homepage:
- Size: 8.79 KB
- Stars: 7
- Watchers: 3
- Forks: 2
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- awesome - GeoShortURL - Plugin to add per-country support to existing short URLs (use it with [302-Instead](https://github.com/timcrockford/302-instead)). (Plugins / G)
README
GeoShortURL
=============
This [YOURLS](https://yourls.org) plugin enables the possibility to have different redirection URLs depending on the country of the visitor, by using YOURLS GeoIP plugin or by using the web server's built-in GeoIP module.It is strongly recommended to use this plugin along with [302-instead](https://github.com/timcrockford/302-instead) plugin to avoid the 301 caching hell :)
Usage:
------For any given short URL you need to 'Geoize' (e.g: http : //my-yourls-installation/**blah**):
- use it to create a new short URL with the desired country code suffix (e.g. for France : **blah-fr**)
- assign it with your country-specific long URLHow to install this plugin
------
1. Create a new directory under the "user/plugins" directory
2. Save the "plugin.php" file into the directory you created in step 1
3. Activate the plugin using your YOURLS admin panelActivate conditional redirection for a set of locales
------Given the following long URLs:
- `https://blah.something/product/product-a` This is the default page in English
- `https://blah.something/ru/product/product-a` This is a Russian page
- `https://blah.something/fr/product/product-a` This is a French page1. Create links in the admin panel, you need to add short URLs like
- `https://my-yourls-installation/a` for `https://blah.something/product/product-a`
- `https://my-yourls-installation/a-ru` for `https://blah.something/ru/product/product-a`
- `https://my-yourls-installation/a-fr` for `https://blah.something/fr/product/product-a`2. Share
After that, you just need to share `https://my-yourls-installation/a` with others,
It will automatically detect and match `my-yourls-installation/a-[geocode]` to redirect to the corresponding locale page or just go to the default (English) page.