MTShorter Module: High-Performance Shortlink Redirects
Optimize link sharing and marketing tracking. MTShorter is a high-performance URL shortening module built for the PolyCMS Repository to manage internal and external redirects under a unified short namespace. The backend is built using Laravel and is fully open-source on GitHub.
Core Features
Manage and inspect redirect records via Short Links in the admin panel:
1. YouTube-Style Random Slug Generator
Generates short, random, secure slugs containing alpha-numeric characters (for example, https://polycms.org/yqDlOmno) automatically for rapid sharing. The default slug length can be customized (default is 8 characters).
2. Custom Path & Reserved Route Validation
Define custom vanity short links (for example, creating a custom shortlink path like https://polycms.org/yqDlOmno pointing to the target URL https://polycms.org/blog). The system automatically verifies custom inputs to prevent duplicates or collision conflicts with core system paths, such as admin, api, login, or predefined URL bases.
3. Multi-Tier Deep Caching
Designed for high-traffic environments. The redirect controller integrates request caching, shared caches, negative lookups caching, and locking logic to prevent backend overload:
- Positive Cache TTL: Cache resolved shortlinks to bypass database hits on subsequent requests.
- Negative Cache TTL: Cache non-existent slugs (for example, 60 seconds) to mitigate database scanning under negative requests.
- Cache Lock: Lock key for hot misses to prevent cache stampedes (thundering herd behavior).
- Cache Jitter: Randomized jitter added to TTL to prevent mass simultaneous cache expiration.
4. Headless & Universal Target Redirects
Link to internal resources (such as single posts, pages, or products) dynamically via ID resolution (meaning if the resource's slug changes, the shortlink remains valid), or configure direct paths pointing to arbitrary external URLs.
5. Buffered Hit Tracking
Track shortlink visits using a buffered counter flush. Click counts are accumulated in cache and flushed to the database in batches when reaching a threshold (for example, 20 hits), preventing heavy database write locks under high concurrent traffic.
6. Geolocation & Detailed Analytics
Log and analyze click events to track performance. The module gathers:
- IP Geolocation: Resolves visitor location (country, city, ASN) using services like GeoLite2, ip-api.com, ipapi.co, or ipinfo.io.
- Device Detection: Parses User Agent to classify browser, operating system, and device type (desktop, mobile, tablet, or bot).
- Traffic Referral: Identifies traffic sources (classified as social, search, internal, external, or direct).
7. Management UI & Presets
Configure sharing presets with predefined templates and custom emoji tokens to generate quick copy-paste texts. Review total clicks, daily graphs, and click logs within the admin panel. Learn more on polycms.org.
PolyCMS is an open-source content management system for modern web applications, inspired by the WordPress plugin and theme ecosystem but built on top of the Laravel framework. It is designed to provide a complete foundation for content publishing, e-commerce, multi-language support, and extensible module architecture — powered by a Vue 3 admin panel with data served entirely through RESTful APIs.
Whether you're building a blog, a documentation site, an online store, or a multi-tenant SaaS platform, PolyCMS aims to give you a comprehensive starting scaffold so you can ship quickly and extend easily through integrated modules and themes. In particular, themes in PolyCMS follow a multi-theme architecture — one Main theme and an unlimited number of Sub themes can run side by side on the same installation.
We hope this ready-made foundation proves useful for building your next website, blog, or web app, saving you from having to start completely from scratch.