• We value your experience with Plesk during 2024
    Plesk strives to perform even better in 2025. To help us improve further, please answer a few questions about your experience with Plesk Obsidian 2024.
    Please take this short survey:

    https://pt-research.typeform.com/to/AmZvSXkx
  • 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.

Resolved 301 Redirect Page via htaccess File

Sally1

Regular Pleskian
Hello,


I would like to do my redirects via htaccess File. I have for example the following code:

<IfModule mod_rewrite.c>

RewriteRule ^business-coach-layout/$ https://mydomain.com/business-layout/ [R=301,L]

</IfModule>

When i add the code snippet to the htaccess File the Redirect is not working.



I changed the snippet already to this, but the Redirect is still not working:

RewriteEngine On

RewriteRule ^business-coach-layout/$ https://mydomain.com/business-layout/ [R=301,L]


Any Suggestion what is the issue?



OS‪CentOS Linux 7.7.1908 (Core)‬
ProductPlesk Obsidian
Version 18.0.23 Update #4, last updated on Feb 11, 2020 03:41 AM


Thx
Best regards
Sally
 
Thanks for the hint. I tried the adapted snippet in the htaccess File, but the redirect is not working still. I was wondering if
I could wrap your snippet in

<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^business-coach-layout/(.*) https://mydomain.com/business-layout/ [R=301,L]
</IfModule>


and add this directly to Apache & Nginx Settings - additional directives http in Plesk ?

Thx
Sally
 
Yes wrapping it in

Code:
<IfModule mod_rewrite.c>

</IfModule>

Makes sense. But if it does not work do you have enabled mod_rewrite ?
Also why not just pasting it into the htaccess in your rootdirectory? This would make it presist, even if you change the server.

Pls also notice: this problem is most probably not related to Plesk itself.
 
Last edited:
i need to redirect from https://[domain.tld]/about to https://[domain.tld]/about-us
and ive added RewriteRule ^about$ /about-us [R=301,L] this code to htaccess file but the redirection is not working why ?
 
Back
Top