Domain Pointers: option to not redirect to www (SKINS)(TEMPLATES)

Version 1.55.0

Feature
Finished

UPDATE with 1.57.0: Deprecated Replaced with force_redirect: https://www.directadmin.com/features.php?id=2365 ====================== NOTE: This feature's implementation may change for 1.55.1, for a different design. As this decision was made after RC1 was pushed, we'll leave this feature as-is for now. If you're a skin designer, you may want to hold off until 1.55.1 before add the changes, since the variable names/tokens may be removed. ====================== CMD_ADDITIONAL_DOMAINS CMD_DOMAIN_POINTER The redirect type of domain pointed used to always redirect to the www.maindomain.com form, without any option to redirect to just maindomain.com. Change to the CMD_ADDITIONAL_DOMAINS & CMD_DOMAIN_POINTER pages. A new checkbox on CMD_ADDITIONAL_DOMAINS (to be posted to CMD_DOMAIN) to let the User decide if domain pointers should redirect to www.maindomain.com or just maindomain.com. ========================= SKINS user/modify_domain.html user/domain_pointers.html New JS to hide/show "www." based on the new checkbox on CMD_DOMAIN_POINTERS The action=modify on CMD_ADDITIONAL_DOMAINS form now also had: form_version=1.1 which is needed in order to use the: www_pointers=yes checkbox. If it's not passed, then with form_version=1.1, it's assumed to be off. Without form_version>=1.1, you can pass either www_pointers=yes or www_pointers=no and DA will pick up the value, as it's explicitly specified. ========================= TEMPLATES redirect_virtual_host.conf nginx_server_redirect.conf added to top section of both: |?WWW_PREFIX=www.| |*if WWW_REDIRECT="no"| |?WWW_PREFIX=| |*endif| and lower down (both again), changed the: www.|DOMAIN| redirect text to be: |WWW_PREFIX||DOMAIN| ========================= DATA FILES /usr/local/directadmin/data/users/USERNAME/domains/domain.com.conf new default: www_pointers=yes which can be set to no via the CMD_ADDITIONAL_DOMAINS Domain Setup page. The domain pointers file at: /usr/local/directadmin/data/users/USERNAME/domains/domain.com.pointers will now have it's format changed from: pointer.com=alias pointer.com=redirect to: pointer.com=type=alias pointer.com=type=redirect&www=no where a late design change mean the domain.com.pointers is not actually used at all... BUT since we will retain the conversion to: pointer.com=type=redirect you *can* add www=yes|no manually to the pointers file, if you want to override the domain.com.conf setting. DA won't add www= to the pointer config.

Try DirectAdmin with a 30-day money back guarantee!