Here’s a possibly simple solution, using an ancillary table, and user-defined short slugs:
create a post_meta “short_slug” when creating a post, the link-name from your example
on save_post,
if (meta_key=’short_slug’ and is_a_valid(meta_value))
wpdb->insert into short_slugs_table slug,permalink ,
your index.php on your mgscr.com could then open a mysql connection to the same db, parse the url and do a Location:redirect.
Related Posts:
- Will references to ugly links automatically redirect to their pretty url permalink?
- WP Login forms action URLs displayed as pretty URLs in browser (ex with Restore Password)
- Sub domain redirection to taxonomy
- Server (WordPress) redirects files that are not supposed to (using htaccess)
- Alias ‘wp-content’ directory to something shorter (framework?)
- Is there a ‘rake routes’ for wordpress?
- add_rewrite_rule fro html to another url not working
- WordPress redirects non-existing url to existing ones – how to disable
- How to disable URL rewriting for specific URLs?
- How do I display only the parent page in the url
- Wildcard forward all posts and pages with few exceptions
- How to redirect large amount of URLs?
- Is WordPress API visible from PHP file called in htaccess
- Redirect to new domain that serves new and different content
- taxonomy term in URL slug won’t forward to the correct term for custom post like it does for default categories/normal posts
- Use a template file for a specific url without creating a page
- Multiple endpoints to same page
- add_rewrite_rule: $matches var not replaced by captured value
- Custom permalinks with NextGEN Gallery
- How do I add a add_rewrite_rule without it redirecting?
- How to create a specific frontend URL (not a Page) from a theme or plugin?
- Passing & Reading URL Parameters with URL re-writing
- Tricky URL rewrite with custom values in url
- Prevent WordPress from automatically correcting URLs
- Taking a value from PHP_URL_PATH won’t work after WordPress 5.5 update
- Display content according to current URL
- redirect 301 old url to new url
- Add a query string to ALL links on site
- Add rewrite rule for rewrite endpoint
- Allow single quote in URLs
- Changing WordPress blog name and web address
- Custom URL rewrite to specific page template
- Creating a dynamic URL structure
- Append a query string to the end of every URL
- Double domain name in category URL-s
- Rewrite Preview URL to include index.php
- Adding special characters to slug?
- How can I replace my primary url globally with a parked one?
- Rewrite custom post type URL parameters
- How to remove wordpress directory slash
- Translate custom post type and taxonomy slug in URL?
- Redirect HTTP to HTTPS for all sub domains (blog posts)
- Right url for custom post type
- Preserve old website URL structure after migrating to WordPress
- Change pagination url format
- Why is WordPress rewriting absolute URLs on staging site to include staging prefix when we manually point them at the live site?
- React Router with WordPress
- Redirecting /px/?q=x to /px/x/
- URL redirect on updating the post date
- Changing URL scheme, mod_rewrite not helping
- How to redirect a link to a new link?
- 301 Redirect all posts urls from .html to / (without .html)
- Re-directing URLs with dates to URLs without dates
- custom wordpress rewrite
- Flushing rewrite rules
- Two sets of url one content?
- 404 redirect based on url
- How to customize sub-URLs in a wordpress website (.htaccess)
- Custom permalink structure with %postname% in front of domain name
- Rewriting a date hierarchy into a ‘yyyy-mm-dd’ slug
- Get logged in username in wordpress url
- How to Force WWW. in Domain With WordPress MU Domain Mapping Plugin?
- URL problem: www.sitename.com/blog and www.sitename.com/learn using same WP installation
- custom url – add attachment’s id or name after post
- WordPress 3.1.2 Network Enabled non-www to www
- When i try to enter subdomain i’m redirected to main domain
- Make the home page’s slug visible in the browser’s URL bar
- How to define a rule in functions.php that ONLY disables the default wp functionality that undesirably changes ‘&’ to ‘#038;’?
- Can’t login to WordPress admin panel after changing domain to use WordPress pages as a fallback from React
- dynamic URL rewrite
- Append a parametter at first or last to a certain URL
- Dynamic URL with rewrite rule not working
- After switch domain, some parts of my site still point to my old domain
- Remove part from dynamic url and redirect
- How to Update / Change URL when Popup Modal Loads?
- Passing a variable to hyperlink text?
- url redirect none www to www
- Rewrite URL to get rid of wp-content etc and change URL
- Root-relative paths being rewritten on ‘Edit Page’ [closed]
- How to remove Base URL Duplication?
- Any way to make Apache’s internal redirect work?
- Get parameters and custom page template
- Pagination appearing twice in URL after rewrite
- Direct Dynamic URL in root to a location within template
- Domain name to a page
- URL Rewrite for CPT single posts
- Migration from old CMS to WordPress 301 redirection rules?
- WordPress post-type create url rewriting
- Can I exclude a single URL from a rewrite plugin?
- How can i maintain permalink structure and avoid a 404 error when loading external content?
- How to prevent URL-modification when page title contains digits only?
- WordPress 3.0 Multisite – Child sites and backends appearing blank
- How do I display a friendly URL link in the frontend?
- Generated URLs don’t reflect accurate URLs.
- Please give me the rewrite rules for my ugly urls
- Spurious URL structure (Adding extra /0/s)
- Using .htaccess to redirect /da/ to / in URL
- WordPress is adding pagination for all pages like www.example.com/page/123. How to remove that?
- Allow requests to resources outside the wordpress folder
- How to change the url of the archive page to be inside the custom post type