Nota: Este artigo foi publicado originalmente em 2013. Alguns passos, comandos ou versões de software podem ter mudado. Consulte a documentação atual de WordPress para as informações mais recentes.
Pré-requisitos
Antes de começar, certifique-se de ter:
- WordPress installation (self-hosted)
- Administrator access to WordPress dashboard
- FTP/SFTP or file manager access to server files
How to: Redirect users to a given site when the visited sub-domain does not exist in a WordPress Multisite deployment
Now, this is a tricky one and I say that because I searched and couldn’t find the answer and I know it is out there! Perhaps I need to word my search better. Anyway, for those who deploy a multisite WordPress installation you probably have come across the following: If you have opened registration (options Logged in users may register new sites or Both sites and user accounts can be registered) then users can register a non-used subdomain to deploy their site.If, however, you have registration closed (Registration is disabled or User accounts may be registered) then the user comes across a default message that reads:
Greetings Site Administrator! You are currently allowing “none” registrations. To change or disable registration go to your Options page.Registration has been disabled.
If registration is disabled, please set NOBLOGREDIRECT in wp-config.php to a URL you will redirect visitors to if they visit a non-existent site. To hide that message you must edit your wp-config.php file and add the following definition:
define( ‘NOBLOGREDIRECT’, ‘http://www.CloudIngenium.com/’ );
You can select whichever URL you prefer. So, say for example that you have created a page to let users know to email you if they want to register that site, you could do so this way. If you wish to install support for multiple domains please visit this link: (<#> “Edit “How to: Map your WordPress blog to multiple domains?””) To deploy other languages to your Multisite please visit this link: (<#> “Edit “How to: Add additional languages to your wordpress installation – Multisite Multinetwork localization””)
(http://img.zemanta.com/zemified_e.png?x-id=b1b53749-492e-4528-a625-e08534f1bf94)](http://www.zemanta.com/?px “Enhanced by Zemanta”)
Resumo
Artigos Relacionados
- Changing file permissions and recommendations for WordPress in a Linux system
- How to: Clean your WordPress database from all the empty Yoast WordPress SEO meta data
- Cómo agregar lenguajes adicionales a tu instalación de Wordpress - Multisitio Multired localización
- How to: Connect to a MySql server using SSL from a WordPress Site