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?
- How do you create a “virtual” page in WordPress
- Multiple endpoints to same page
- How to make a category page the blog home page?
- Preserving $_GET parameter while using custom Rewrite Rule
- Handle category name URL rewrite before different post type slugs
- Taxonomy rewrite question
- Getting add_rewrite_rule and add_rewrite_tag to work
- Why did installing wordpress in url root jack up underlying WP sites?
- How do I create a dynamic page?
- Dynamic URL, not a physical page within the database
- Passing & Reading URL Parameters with URL re-writing
- Woocommerce different URL for every table placed in the restaurant
- Prevent WordPress from automatically correcting URLs
- add_rewrite_rule and pagination issue
- Display content according to current URL
- Nginx rewrite rule conflict with WordPress permalinks rule
- External/non-WP rewrite rule without QSA
- How to do Basic URL Rewrite Without Redirecting
- URL Rewrite doesn’t work for nested pages
- Using custom mod_rewrite without breaking wordpress permalinks
- How does WordPress determine if a paged query var is too high?
- WordPress URL redirect
- How to redirect http://mydomain/blog/blahblah/ to http://mydomain/blahblah/ in wordpress htaccess?
- Append a query string to the end of every URL
- Url Rewriting a dynamic wordpress page
- subdirectory install breaking existing links
- Right url for custom post type
- Preserve old website URL structure after migrating to WordPress
- Rewriting “pretty” blog category URL with htaccess / add_rewrite_rule() causes 404 page
- Custom rewrite causes 404 on pagination
- Rewrite URL based on home_url
- Replace term archives with static pages
- Why does my URL rewriting only work using two different methods?
- Using a custom 410 page
- IIRF + IIS 6 + WordPress does not return 404 error
- Rewrite vs Redirect from ?p={ID}
- Is it possible to set the same base for categories and tags?
- Adding a rewrite rule to page that has no fixed variables and pagination
- Flush rewrite rules on option update with Settings API
- Integer based rewrite isn’t recognized for value of 1
- Re-directing URLs with dates to URLs without dates
- Help with a custom rewrite
- Not able to rewrite the pagination URL for the posts
- add_rewrite_tag works for some parameters but does not for others
- Rewrite specific action url
- Using URL rewrite to add custom URL for custom post type
- 301 Rewriting htaccess
- Using page as front page, why does /page/### work?
- Rewrite rule shows 404 page
- Exclude subfolder in WordPress permalink
- wordpress path generation from rewrite rule
- How to add dot(“.”) in post slug
- Add www to the Root Site in WP Multisite Network
- Multisite problem with unexisting paths to CSS etc
- WordPress pagination broken for page 2,3 with custom permalink. Redirects to baseurl
- Permalink not changing according to post type
- Rewrite rule for custom permalink structure
- Help with .htaccess setup to hide WordPress Directory
- Ugly URLs when there’s pagination
- Unable to access the query variables in the template
- Hide wordpress source code
- Why is there a 404 on page 2+ for my search page?
- Custom rewrite from URL to URL using slug
- URL rewrite before template_redirect called
- Properly maintaining an old rewrite structure
- .htaccess RewriteBase equivalent for WordPress – Passing a URL as a variable without getting a 404
- URL Rewrite for CPT single posts
- Using 2 URL’s for WordPress
- Rewriting WordPress URLs
- Need Help With A Rewrite Issue
- Function to rewrite URl in WordPress
- How can i maintain permalink structure and avoid a 404 error when loading external content?
- Can’t get pretty permalinks to work without index.php
- How to rename the WordPress wp-login.php running on IIS6?
- get parameter from url rewrite [closed]
- Spurious URL structure (Adding extra /0/s)
- Programmatically add a custom url route “/category/index.json” to return a collection of posts in json
- WP-Include rewrite directory