URL Rewriting allows you to change the URLs that appear in links on your page when visiting the page with a mapped domain.
When mapping domains, you need to be careful about Internal Links. If you're linking to a page that is not mapped properly, the link will be considered a "dead link" and your website visitor may arrive to a 404 or different page than intended.
Because many links are automatically generated in WordPress (like menu bar, copyright bar in some themes, etc), we created the URL Rewriting mechanism to properly allow internal linking.
If you're building a subsite and don't want anyone to visit any other URLs on your site, Global Rewriting is beneficial because it forces all URLs on that page to go to the mapped domain the visitor sees in their browser window.
Warning: When using Global URL Rewriting, ensure you've mapped all the pages that are "linked to" on your mapped pages. If you don't, you'll have dead links that go to 404 because they are not mapped and the URL has been rewritten to the mapped version of any linked page.
The main benefit of Global Rewriting will prevent this visitor from seeing any other domain when navigating your site.
With Global Rewriting enabled, the URL your visitor sees in their browser's URL bar will match all the links on the page they're viewing, excluding any external links.
- All of them, including:
- Hardcoded links.
- Any automatically generated links that have WordPress hooks (logo URL, menu items, footer copyright content, etc).
If you're mapping domains and don't have a strong preference about whether or not internal links will allow visitors to navigate to other domains mapped to your site, then you'll want to leave Selective URL Rewriting enabled.
The benefit of Selective Rewriting is that mapped pages are automatically detected before a link is rewritten.
For example, if you have a menu bar with 10 items and 5 of them have unique mapped domains attached, those menu item URLs will be rewritten to their corresponding mapped URLs.