I would actually tackle it with the .htaccess
file, using RewriteCond
and RewriteRule
, something like:
RewriteCond %{REQUEST_URI} ^/advice-on-(\[a-zA-z])$
RewriteRule ^/?(.*) http://domain.com/customadvice?advice=$1 [L]
Note that the Regex in the parenthesis will be reused as $1
in the RewriteRule
.
You should then have a WordPress page on /customadvice
and use the $_GET
attribute from the page template for whatever use you need.
The path /advice-on
should still give a 404.
Related Posts:
- Problem with guids and absolute links
- Why is WordPress saving full-urls to the database?
- How to remove /index.php/ from URL’s
- How to remove “http://” When Echoing URL?
- WPML Get url without outputting
- Weird: /?name in URL leads to blog
- I am Looking to append URL Parameter to all URLs
- How do I amend the fixed “author” part in the URL?
- Change homepage url
- get_site_url is not returning anything?
- Check what is at URI (post, archive, etc…)
- Use image url with add_image_size
- How can I change all links on pages to point to a different domain from where the site is hosted?
- Changing my site url from azure.net to custom domain
- Special domain for a page
- How to delete unused URL?
- urlencode query string in gravity forms confirmation redirect
- Pages other than Home page not displayed even when URL is good
- How to server wordpress from SSL and non-SSL URLs
- Author Nickname URL Friendly
- Rewrite WordPress Standard Feed URL – /feed/ to feed.xml
- Should I set the html base url when using wordpress?
- Set a custom URL for image in the Media Library?
- How do I test my localhost WordPress project with VirtualBoxVM?
- How do I link to a blog not set as the homepage?
- Updating URLs in many posts
- How to edit URL Slug?
- Save URL into database
- Publish Post when URL is available else reschedule the post in wordpress [duplicate]
- Change url links on members loops in buddypress
- Imported 10 000+ posts, custom field showing link not displayed
- Find file url in post content and add it to media library
- rewrite taxonomy-{taxonomy}-{term}.php terms
- Multiple URLs with Numbers
- How to add URL-Parameter for Javascript Widgets?
- previous_posts_link and next_posts_link, how to return the next/previous post’s title as the url
- hijacking home_url for root relative paths
- Get Top parent url
- How to properly print a 404 error without redirecton? (i.e. keeping the current URL)
- hide wp-content from urls
- Can anybody provide me with a function to generate slugs?
- Is there RELATIVE_PATH, like ABSPATH
- Changing the website URL to the root folder
- Accessing WordPress using “localhost” and local ip at the same time
- Open editor post in a popup
- Organizing the Navigation Menu
- Porting site URLs to new host but with same domain name [closed]
- My #id is not showing in the url when the user clicks on the anchor tag
- Is there a way to test if a URL is part of the current blog?
- Showing my server ip in source code for several links not for all links
- What php gets called for home_url/somepage URL?
- Moving Website-URL
- How to prevent unknown addresses which are accessed from my wordpress website [closed]
- Use wp_redirect to add a parameter
- Extracting a variable from a permalink
- Is there an URL listing latest posts
- After changing the site root, how to reflect this for wp-admin too?
- How can I prepopulate the URL address for the add media button
- Need help changing back the correct wordpress url
- How to show Specific URL of WordPress on Any one Specific IP only?
- Adding Parent Categories and keep current URLs
- Different url to same page (with dynamic content)
- How rewriting a url to make it SEO friendly
- How to make a seo friendly URL of 2 different pages with same words
- Mapping a domain name
- Add a paramter to page url
- No https in url when writing links like:
- Why “?v=hash” is added to my URLs? [closed]
- Why my URL has an unknown character string?
- WordPress inserting ?q= in URLs
- No url when downloading PDF
- Set A Cookie To URL Parameter, Pass Cookie From Page To Page To Alter Post
- Embed ACF URL Field in WP title field
- Getting Turkish alphabet characters in the URL field in webbrowser
- Post not redirecting to non www after changing from www
- incorrect url in Snippet editor
- Use URL parameter to create dynamic content
- Generate new URL for popup form
- In-page link works in Firefox but not in Chrome
- How to properly setup MAMP and XIP
- URLs fine in database but wrong in output
- Cannot access to dashboard on localhost
- My website has some Crawling Errors?
- How can I modify the ‘Insert/edit link’ option to offer root-relative urls?
- How to set global variable in functions.php
- Why am I seeing ‘yes’ and ‘no’ in URLs crawled by Xenu?
- bloginfo no show the right path
- URL with without www shows just a blank page
- How to create custom authors links
- Using functions concatenated with strings inside a variable
- After site transfer I’m still getting redirected to the old site (WordPress)
- How to generate external url in WordPress
- All font sizes change when manually typing 2011 into url and going to archive page
- apply styling only to a specific url
- URL, which automatically close tab
- How can I implement an Article Wizard for non-existing URLs? [closed]
- How to write url to display all posts of certain type and taxonomy with given term_id
- Where can I add list of external URL for WP ADD link tool?
- WordPress page URL: Get rid of /wp-content/… part from URL
- How to create multiple urls for a same page contents in wordpress