Can set "Preferred domain" setting in the "Service Plans"
In the "Service Plans" part, there is no option for setting the "Preferred domain" (seoRedirectDirection).
it is very inconvenience, because we need to set the "Preferred domain" (seoRedirectDirection) again and again after created the site.
It is possible to add this setting in the "Service Plans" part?
Heikki Saarinen commented
Victor Inceu commented
> To which value you need to reset “preferred domain”? None?
Yes the generic value of "None" would be ideal, otherwise preserving former behavior, setting it to domain (as default) produces redirection loops in various CMS's installations.
The path suggested by Marten is good workaround except it suggests a dangerous malpractice which will surely make your changes overwritten by Plesk.
As Plesk documentation indicates you should never change templates in default/ folder (will surely be overwritten). Instead, copy those files into custom/ folder and modify them there without any risk of your changes lost
So the corrected path should be
1. Identify this folder
(go /opt/psa/... for Debian/Ubuntu) and copy it into
Make sure you preserve ownership and privileges
2. Locate the file /usr/local/psa/admin/conf/templates/custom/domain/service/seoSafeRedirects.php
and comment out all relevant commands
2a. If you break something, just recover from /usr/local/psa/admin/conf/templates/default/domain/service/seoSafeRedirects.php
2b. Then edit /usr/local/psa/admin/conf/templates/custom/domain/service/seoSafeRedirects.php
Now continue with original Marten's instructions and your changes are safe for all future Plesk upgrades
As the Plesk-guys seems rather useless here, it's actually quite simple to override this.
1. Identify this file:
2. Comment out all relevant commands
2a. If you don't know what you're doing, take a backup by running:
cp /usr/local/psa/admin/conf/templates/default/domain/service/seoSafeRedirects.php /usr/local/psa/admin/conf/templates/default/domain/service/seoSafeRedirects.php.bak
2b. Then do:
2c. Comment out anything starting with RewriteCond or RewriteRule (Add # before the line)
2d. Close by ctrl+x + y + enter
3. Redo plesks vhost.conf-files:
4. Pray to god that Plesk won't update this seoSafeRedirects.php-file without notifying you... I removed write access to it...
Everything above assumes you are logged in as root. If you're not root, run this before everything:
sudo -s -H
Heikki Saarinen commented
We would like it to be none
There's a setting under site-alias that looked promising in the API, called SEO redirect, see here: http://download1.parallels.com/Plesk/PP11/11.5/Doc/fr-FR/online/plesk-api-rpc/index.htm?fileName=28785.htm - doesn't work though, it does not recognise anything but web, mail and tomcat as parameters... Error message: "Parser error: Request is invalid. Error in line 9: Element 'seo-redirect': This element is not expected. Expected is one of ( web, mail, tomcat )."
It is really annoying to have to change this for each client going through our system, I'd rather you removed this feature, or at least gave us an option to disable it higher up in the hierarchy. Service Plans would be an excellent place to do that!
Back to the point, either make this an option in the Service Plans, or make the API work as intended.
same problem here, I'm tired of doing this on every subscirption after created, any solution yet?
To "WWW" value ALWAYS.
We add domains using API RPC and always we need to set to "WWW" manually after created each domain.
Set "Preferred domain" in the "Service Plans" i figure that would be a good solution. Other idea would be set this param in the call action when add domain in API RCP.
Plesk 11.5.30 update 32 - WINDOWS