• Please be aware: Kaspersky Anti-Virus has been deprecated
    With the upgrade to Plesk Obsidian 18.0.64, "Kaspersky Anti-Virus for Servers" will be automatically removed from the servers it is installed on. We recommend that you migrate to Sophos Anti-Virus for Servers.
  • The Horde webmail has been deprecated. Its complete removal is scheduled for April 2025. For details and recommended actions, see the Feature and Deprecation Plan.
  • We’re working on enhancing the Monitoring feature in Plesk, and we could really use your expertise! If you’re open to sharing your experiences with server and website monitoring or providing feedback, we’d love to have a one-hour online meeting with you.

Question change the default 301 redirect

fabieng

Basic Pleskian
Hello
I set up some domain alias with 301 redirect. I can see in vhost that all the path after old domain is kept for new domain.

I would like to change that as both domains does not have same path structure, so need to redirect everything to homepage (except one single page, but let's play first to redirect all to new domain homepage)

for instance :
olddomaine.com/titi has to redirect to newdomain.com and not newdomain.com/titi

I changed
RewriteEngine On
RewriteCond %{REQUEST_URI} !^/devis
RewriteCond %{HTTP_HOST} ^oldurl\.com [NC,OR]
RewriteCond %{HTTP_HOST} ^www\.oldurl\.com [NC]
RewriteRule ^(.*) https://newurl.com [L,R=301]

>> but any /titi o /toto is kept.

is there any other redirect somwhere else ?!

thx for your help !
 
because I tried to use first the plesk functions, but maybe you're right, maybe plesk is not able to manage properly that.
 
Back
Top