i'm making this website using wordpress as headless and using gatsby in the front-end, i pass the information using the api

I have the wordpress in a URL example ap-backend.com and the front-end in other URL which is the "main url" of my page for example ap.com

For avoid people try to see and check the back end i made the follow function to redirect to my main url

function redirect_website() {
        if ( ! is_admin() ) {
            wp_redirect( $main_website, 301 );

where the $main_website has the main URL and if someone try to check ap-backend.com this redirect to ap.com

Right now i want to create a newsletter using the rss feed and as you can imagine if i use the ap-backend.com/feed/rss i see is the main url, so my question is, can i have the redirection to all url except the url of the feed? (ap-backend.com/feed/rss) or can i redirect to have that info or ap.com/feed/rss i see that i can do it in the .httaccess but this is a validate opcion?

Thanks for the help guys!



Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.