Asumption: You use Apache as your web server.
If you already know the page slugs and they won’t change, just add them to your .htaccess
file. It’ll be much faster and less complicated.
Paste the following Redirect
lines at the top of your .htaccess
file.
Redirect 301 /pagetitle/ /service/pagetitle/
Redirect 301 /pagetitle2/ /another-dir/pagetitle2/
# BEGIN WordPress
<IfModule mod_rewrite.c>
....
Related Posts:
- Is it possible to rewrite a page url Without setting the permalinks to Post Name?
- How to show the root webpage on all subpaths
- category slug and page slug same
- Organizing Your Pages
- How to create cutom link for page
- remove “index.php” from permalinks
- Access the same page from multiple urls (wildcard)
- How to Rewrite WordPress URL for a Plugin
- URL Rewrite + Page + Custom Post Type = Unusual Redirect
- How to inject custom url path for page ?
- Why does wordpress still strip my query var?
- How to Add Pages Under Custom Post Type URL Structure?
- flexible rewrite ‘ramble’ URLs with WordPress
- Custom rewrite rules for feeds of custom queries (query_var query strings in URL)?
- Tricky URL rewrite with custom values in url
- How to change page URLs to “www.site.com/page” instead of “example.com/blog/page” but keep post URLs as “example.com/blog/post”?
- add_rewrite_rule: Issue converting path to url
- add_rewrite_rule not registering on Multisite
- Add a query string to ALL links on site
- Add rewrite rule for rewrite endpoint
- add_rewrite_rule not working for language specific characters
- How to Modify Existing Rewrite Rules?
- custom permalink/shortlink with base62 encoded post ID
- How to change URL Custom Page?
- Newbie question: no index.php? in my plain wordpress permalink
- Remove number in URL
- Clean URL link for page without number
- Viewing category pages without the word ‘category’ in URL
- How to add custom variable in url without redirect?
- Is there a way to create a URL (new WP page) that can only be accessed from a specific source?
- How to change only the home page / front page url on wordpress
- Making a custom help center page
- How to building pretty URLs to reflect category hierarchy?
- How to add a Rewrite Rule / Category Structure
- Blank Pages with # URL & Google
- Rewrite custom post type URL parameters
- Front custom edit post page for each post
- Help with Rewrite Rule for Custom Post Type with Query String
- Rewrite Question Mark in Post Template to Make it Pretty URL
- Site url is not showing the home page
- Access the same page from multiple urls (wildcard)
- Change pagination url format
- Create custom permalinks to show Custom Post Type’s relationship?
- Per Page Permalink Structure for Page Post Type
- Custom category URL rewriting
- Rewrite /category/cars into /topics/cars
- How to get page_id for url rewrite or how to use page slug for calling a page?
- custom wordpress rewrite
- Getting back a permalink from custom url
- Rewrite to load homepage for a different url
- How to use wp rewrite to hide form action url?
- Need Help with Custom ModRewrite
- Separate URL for a specific page
- return page name in url
- WordPress rewrite rule for specific page and second parametr doesnt work
- Add separate list of pages under Admin
- How to fix broken URL – https://mywebsite.com/comments/feed/
- Custom route and extract data from slashes and parameter
- Add prefix to url, but products not showing in page SHOP
- Multiple Taxonomy Items for Separate URLs
- what does the symbol “?” mean and how can i edit that page?
- Dynamic URL with rewrite rule not working
- Using a template file for a specific custom URL
- Add addtional page parameter before loading the page
- There is how to change url domain on some posts?
- How do I rewrite URL that has custom parameter
- WordPress form submit to custom page template does not work
- Change URLs in default WordPress slider to relative from absolute
- How to approach need for virtual page on my WP site?
- a way to support totally different url structure
- Change url to posts if they have custom tax only
- Any way to make Apache’s internal redirect work?
- Access link page and not folder content of that link
- Pagination appearing twice in URL after rewrite
- New page has incorrect URL
- URL Rewrite for CPT single posts
- Temporary download page or restrict static download page based on how the user got to the page?
- How to Rewrite WordPress URL for a Plugin
- Rename page URL
- WordPress post-type create url rewriting
- How to Rewrite WordPress URL for a Plugin
- WP Job Manger change jobs url (NOT slug)
- Blog posts are not appearing as subs of Blog Page
- How to add page category slug to base url
- How to change the default location where new post gets stored?
- Create a page without adding a page in the Database
- Get Permalink for the top level parent of child pages
- Force the Website URL to Include “www” and to be Upper Case?
- Registering multiple sidebars with data from an array
- How to open a phpBB forum in the same website as sub-page [closed]
- Text Editor Tags
- How do I display only the parent page in the url
- Custom taxonomy rewrite with query var returns %2F in URL
- External stylesheet per page
- add_rewrite_rule – Page Slug from “/foo-bar/” to “/foo/bar/”
- How to delete the scrollbar in my pages?
- How to make a page as default page for a theme without a plugin?
- i want to change URL of WordPress image or rewrite in runtime
- Font Page overrides rewrites
- making a pseudo-static page