Domain Masking
-
I’m trying to implement forward and masking of a url. I have a page hosted on vercel.com as mynewpage.vercel.app. The rest of my page are hosted on WordPress on myotherpages.com. I want for when the user types in myotherpages.com/newpage or navigates there from the nav bar for them to be forwarded to mynewpage.verce.app, but have the url in the address appear as myotherpages.com/newpage. I’m using the divi theme for all the other pages.
So far I’ve installed a file manager plugin to get access to the htaccess file. I added this to the file:
# BEGIN Custom Redirect and Masking RewriteEngine On RewriteCond %{REQUEST_URI} ^/myotherpages.com/newpage$ RewriteRule ^/myotherpages.com/newpage$ https://mynewpage.vercel.app [R=302,L] # END Custom Redirect and Masking`</code></pre> <p>And this to my functions.php file. </p> <pre class="wp-block-code"><code>function custom_redirect_my_new_page() { if (is_page('myotherpages.com/newpage')) { wp_redirect('https://mynewpage.vercel.app'); exit(); } } add_action('template_redirect', 'custom_redirect_my_new_page');</code></pre> <p>I'm able to be redirected but the masking isn't working. I'm using Divi theme, but I don't think that's relevant. </p> -
Hi @latifah44! You’ve reached out to WordPress.com, but the sites you mentioned are not hosted here. The only sites you have with us are https://zincchef.wordpress.com/ and https://test13072.wordpress.com/ which don’t seem to be being used.
Based on your description, it sounds like you have a self-hosted WordPress.org site, which we cannot provide support for. Please contact your hosting provider or post to the WordPress.org Forums.
You can read more about the differences between WordPress.com and WordPress.org here: https://wordpress.com/support/com-vs-org/
- The topic ‘Domain Masking’ is closed to new replies.