Sometimes this would be achievable with add_rewrite_url but it looks like in this case it’s not as you need to redirect to a different domain.
In this case you need .htaccess or nginx rules to do this, so you need to add something like this to your nginx config for domain.com only, in order to rewrite those URLs:
rewrite ^/resources/(.+) https://materials.domain.com/$1 permanent;
You’ll likely need to restart nginx after you add this to the config file.
Happy to help if this doesn’t do exactly what you want. There’s more examples of nginx rewrite rules here: https://www.thegeekstuff.com/2017/08/nginx-rewrite-examples/
Related Posts:
- WordPress Multisite Network Shared Custom Post from Main Site using single-CPT.php
- How to disable the single view for a custom post type?
- Custom post type single page returns 404 error
- Conditional for single-{post-type}.php
- WPML with WP_Query serving up all 3 languages [closed]
- Template for specific post of custom post type
- Single custom post type page redirecting to 404 page
- Templates for Custom Post Types and Custom Taxonomies
- Multisite wide post type?
- Disable Single Post View for Specific Taxonomy on Custom Post Type
- How to get a list of term names of the custom post type im currently on in single.php
- is_singular won’t call my functions?
- Create sub single pages
- Using previous_post_link and next_post_link to wrap around post sequence
- Querying Posts by Taxonomy From Alternate Network Site
- WPMU: Programmatically adding CPT posts to specific blog id
- How do I create new content pages for my Custom Post Type?
- Display “Post 2 of 4” on single post page?
- posts_nav_link on single post template
- Disable single pages and archives and keep preview
- Custom template for post type not working
- Make custom post type display as a page
- How do I Use Nested Loops of Custom Post Types for MultiSite Blogs using WP_Query()
- Rewrite Custom Post Type URL slug
- Multisite Global Custom Posts
- Multisite with a single, shared custom post type, while retaining site URL
- Multisite custom post type’s single page 404
- Disable single view in register_post_type [duplicate]
- Custom Post Type vs. User Page
- Archive page for custom post type not working
- Need post_type_archive_title function but in ‘single’
- pagination redirecting from page number url before page requested
- How to check the terms in single custom post type template
- How to show the archive / post type description on Single templates
- Need to display same custom post type on 2 different singles templates
- Made Custom Post Types, but single.php not working
- Posts of custom post type load the page template
- Custom Taxonomy Invalid in REST API
- How do I display tags for a custom post type single page?
- How to set up multisite for multi language?
- Custom post type not displaying content from single-{custom post type} page
- custom post type parsed as attachment
- How to build custom route by adding taxonomies to URL ? ex: www.demo.com/communities/palo-alto/
- Single template showing all posts of that type
- WPMU: Cross site custom post type
- Displaying All Posts of a Custom Post Type in WordPress Multisite Backend
- How to display single post from custom post type loop?
- Setup template_redirect using has_term when NO term assigned
- Multiple pages for posts?
- How can you use one database with multisite
- Multisite: How to define and limit a Custom Post Type to specific sites?
- Flush Rewrite Rules when new site is created on network
- Not Able To Render Single-CustomPostType.php File
- single-{post_type}.php not working
- Cant get paginations on single.php to work with my custom post types
- Including all post id’s of a custom post type into an array
- Associate page w/ specific single post template?
- List of users that clicked a ‘Join’ button at single post
- Inserting custom fields into single.php
- Assigning alternate single-{cpt} template based on blog_id in multisite
- WordPress multisite – is it possible to have different taxonomies for each site?
- Is there SEO or related limitations to using Custom Post Types instead of WPMU?
- How to migrate Custom Field Template to a WordPress Multisite
- Can’t access private custom posttype single- or archives-page
- How to show custom field on specific custom post type posts only when filled
- adding custom post type “name” to single template
- Using custom post types WordPress network
- Make Next and Previous on single-$posttype.php use the same order as archive-$posttype.php
- Function to allow single post template based on custom taxonomy?
- WordPress giving me the index
- Give active class to current page on a while loop WP query for custom post types listing
- custom post type – project link output via single-portfolio.php
- How can I write slugs / permalinks as: custom post type -> custom taxonomy and custom post type -> custom taxonomy (one CPT and many taxo)?
- Shortcode and get_template_part
- Adding a Section for Visitors
- How to make “single post” permalink maintain it’s sub-page structure
- Assign for all post of a post type a specific single-post template
- Making permalink for custom post type/custom taxonomy. Stuck with 404 in the single post
- How to show data content from single page which is from custom post type?
- Custom Post – additional param in the custom post URL goes to error page
- How to get adjacent_post custom_field value
- Single Page of Custom Post Type Not Showing the Content Of post
- Edit single page from plugin
- Main site single-property.php design, as homepage of a multisite
- How to set class to “current-page” on the currently viewed single post within a CPT
- How to Fix Custom WordPress Loop with Pagination on Single Post View?
- How to display category wise posts on seprarate template
- Pulling in Related Posts based on Post Type array
- how to load custom single.php?
- Two single.php files?
- Multisite – Echo admins profile meta
- Conditional Tags If Custom Post Parent & Child?
- install.php Custom Taxonomy Term not being added to custom post
- How to make a list of posts displaying them 5 by 5 with a “next posts” link?
- Fatal Error WordPress Custom Post Type UI + WPML
- Create WP multisites as a custom post type
- Custom post type single page fine for admin, 404 from front
- Can Multisite and Custom Post Types work this way?
- Multisite permalink issue
- Adding a new custom post type using the editor causes 502 bad gateway error