: How do I redirect Pages to the Subdomain with same URL Format? How do I redirect Pages from the main site with 404 Status to the Subdomain with same URL Structure? This for example: https://www.example.com/rent
How do I redirect Pages from the main site with 404 Status to the Subdomain with same URL Structure?
This for example:
www.example.com/rent
this returns a 404 Error and must be redirected to:
subdomain.example.com/rent
Is this possible on WordPress? If it is how can we do it?
More posts by @Tiffany637
2 Comments
Sorted by latest first Latest Oldest Best
There are several ways to add redirects for specific pages to a WordPress blog. There are plugins and extensions to WordPress that will allow redirects. www.wpbeginner.com/beginners-guide/beginners-guide-to-creating-redirects-in-wordpress/ recommends two of them.
I would take the approach of editing the .htaccess file and just putting the redirect in there:
Redirect permanent /rent subdomain.example.com/rent
Do this in .htaccess file in main subdirectory
RewriteEngine On
RewriteCond %{HTTP_HOST} example.com
RewriteRule ^(.*)$ sub.example.com/sub [R=permanent,L]
Terms of Use Create Support ticket Your support tickets Stock Market News! © vmapp.org2024 All Rights reserved.