• Plesk Uservoice will be deprecated by October. Moving forward, all product feature requests and improvement suggestions will be managed through our new platform Plesk Productboard.
    To continue sharing your ideas and feedback, please visit features.plesk.com

.htaccess not work - KB 124

kabayo

New Pleskian
Hi

Plesk 11 - Centos 6

I try to redirect old domain to new domain in same server with .htaccess :

RewriteEngine On
RewriteCond %{HTTP_HOST} ^syt.com.ar$ [OR]
RewriteCond %{HTTP_HOST} ^www.syt.com.ar$
RewriteRule (.*)$ https://www.syt.com/$1 [R=301,L]

Not work.

In KB say try this: http://kb.parallels.com/en/124

But when look in that file show:

cat /etc/httpd/conf.d/zz010_psa_httpd.conf

#ATTENTION!
#
#DO NOT MODIFY THIS FILE BECAUSE IT WAS GENERATED AUTOMATICALLY,
#SO ALL YOUR CHANGES WILL BE LOST THE NEXT TIME THE FILE IS GENERATED.
Include '/usr/local/psa/admin/conf/generated/13517861040.80700300_server.include'
Include '/usr/local/psa/admin/conf/generated/13517861040.80700300_horde.include'
Include '/usr/local/psa/admin/conf/generated/13517861040.80700300_atmail.include'
Include '/usr/local/psa/admin/conf/vhosts_bootstrap.conf*'

Now what?
How to use .htaccess to redirect some domain to another in plesk 11 same server.

Any help apreciated...
 
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteCond %{HTTP_HOST} ^olddomain.com$ [OR]
RewriteCond %{HTTP_HOST} ^www.olddomain.com$
RewriteRule (.*)$ http://www.newdomain.com/$1 [R=301,L]
</IfModule>
If you dont have AccessFileName .htaccess in your httpd.conf file just add it there

echo "AccessFileName .htaccess" >> /etc/httpd/conf/httpd.conf
service httpd configtest && service httpd stop && service httpd start
 
Back
Top