I have created the custom URL using the function:
add_rewrite_rule($regex, $redirect, $after).
add_rewrite_rule(
'^my-page/(.+)/?$',
'index.php?pagename=my-page&url=$matches[1]',
'top' );
You can write your own custom rewrite rule and redirect to appropriate page:
Related Posts:
- Two (or more) parallel (sub-)TLDs that are retained when surfing the site / dynamically set the site address?
- Rewrite default post type
- redirect 301 old url to new url
- Changing WordPress blog name and web address
- How to rewrite url wordpress?
- How do I retain url parameters the entire time a user browses my site?
- wordpress url correction
- Redirect htaccess [closed]
- Replace “http://localhost:8888/” by website URL in WordPress
- Two sets of url one content?
- change the url in wordpress
- Get logged in username in wordpress url
- URL problem: www.sitename.com/blog and www.sitename.com/learn using same WP installation
- how to move another machine or server without dealing with IP
- loading images, css and fonts from site url
- WordPress is adding “category” word before my actual category name in url (and this is unsolicited)
- WP returns to domain root instead of siteurl
- Homepage cannot be found
- Error 404 wordpress redirecting URL
- How to retrive previous Domain URL in Wp
- Lost WordPress website access after changing URL [closed]
- WordPress is adding pagination for all pages like www.example.com/page/123. How to remove that?
- Redirect all URLs in WordPress and Permalink to by country to subdomain
- How to create custom URL routes?
- How do you create a “virtual” page in WordPress
- How to create a front end user profile with a friendly permalink
- Use a template file for a specific url without creating a page
- Using the Rewrite API to Construct a RESTful URL
- Does WordPress keep track of a post’s URL history and provide automatic redirects?
- Change the “page” slug in pagination
- Understanding add_rewrite_rule
- Override default url for author pages?
- web.config conflict on IIS
- Rewrite Slug for CPT Archive Pages to Plural Name of Slug
- Change author base slug for different roles
- Masking wp-content/themes/name/images to just images directory using htaccess
- Using custom/dynamic “slug” for a page
- How to make pages slug have priority over any other taxonomies like custom-post, post or category
- Rewrite rules not working in WordPress
- How to retrieve $_GET variables from rewritten URLs?
- Dynamic Endpoints
- Passing parameters to a custom page template using clean urls
- rewrite rules and querystring
- Getting the Site URL Including the Front Base
- Adding rewrite endpoint breaks static front page
- How to add custom rewrite rule to .htaccess?
- How do I remove a rewrite rule?
- How do I add a server-independent external rewrite rule?
- Multiple endpoints to same page
- Problem with add_rewrite_rule and pagination (paged and page query_vars)
- Use subdomain for certain urls
- Custom Permalinks for Blog Posts Only
- Unique URL Every Time
- generate_rewrite_rules (action) vs add_rewrite_rule (function): which one is preferred?
- Detect page type by url (Archive, single, page, author,…)
- Rewrite URL – how to do a SEO-friendly Unicode custom URL?
- I want to create a custom slug in WordPress and output JSON. How do I do this?
- How to make a category page the blog home page?
- add_rewrite_rule: $matches var not replaced by captured value
- Can I call a custom plugin with a direct URL
- How to show the same content on multiple URLs?
- Custom slug in front of search URL
- Display posts with author in the url with custom post types
- Custom rewrite rules for pages
- Custom permalinks with NextGEN Gallery
- Clash of the rewrites
- Using a page template without a page
- External/non-WP rewrite rules
- How-to add rewrite rules to point the uploads folder to a subdomain
- Rewrite Rules for Multiple (more than 2) Taxonomies
- Create built-in pages without creating actual pages
- How to seamlessly redirect between different archive and singular slugs?
- Is the SEO plugin necessary?
- Can ‘numberposts’ be passed in the URL query string?
- How to add dot(“.”) in post slug
- How to prevent redirection to max 2147483647 for larger values of the page query variable?
- add_rewrite_rule not loading correct page nor getting variables
- how to use a different domain/subdomain for authors/catagories on single site?
- Overwrite rewrite-slug of built in post-type ‘post’
- Preserving $_GET parameter while using custom Rewrite Rule
- How to change default page slug?
- Query Vars for the Homepage?
- Disable wordpress pagination URL rewrite for specific page
- How to use Post Custom Metadata in Post Titles and Post Permalinks
- Using WordPress with Apache behind an nginx reverse proxy
- Handle category name URL rewrite before different post type slugs
- Using plus (+) sign instead of space (-) in WordPress URL
- Rewrite url for custom post type
- How do i change the search permanent links
- add_query_vars and add_rewrite_rules
- How to remove “admin.php?page=” from wp-admin using .htaccess?
- add_rewrite_rule() not playing nice with child pages
- WordPress URLs without posts
- rewrite_rule() not preserving the query string
- Need help with rewrite_rules_array
- Add language/country code to each possible URL
- Google is indexing wordpress attachment pages
- How to create the pseudo static rules of the page I created
- Changing directory and/or URL structure
- SEO Friendly URLs for my plugin categories