How can I configure redirects in Plesk?

Created:

2016-11-16 12:45:52 UTC

Modified:

2017-04-24 11:16:26 UTC

0

Was this article helpful?


Have more questions?

Submit a request

How can I configure redirects in Plesk?

Applicable to:

  • Plesk 12.5 for Linux
  • Plesk Onyx for Linux
  • Plesk 11.0 for Linux
  • Plesk 11.5 for Linux
  • Plesk 12.0 for Linux

Symptoms

What Web Server (Apache or Nginx) configuration files should I use to create redirects?

Resolution

In general you should follow the simple rule:

  • If HTTP request is processed by Apache, then you should use Apache configuration files.
  • If HTTP request is processed by Nginx, then it us needed to use Nginx configuration files.

How can I determine which Web Server is used?

It depends on your Web Server Settings :

Redirect settings

  1. All three options are enabled:

    • Smart static files processing
    • Serve static files directly by nginx
    • Process PHP by nginx

    In this case all the requests will be processed by Nginx web server, so you should add redirect rules to "Additional nginx directives" section.

    NOTE: in case if HTTP request is send to non-existing static file, it will be always processed by Apache even if option "Serve static files directly by nginx" is turned on.

  2. Process PHP by Nginx is enabled, other options are disabled:

    • Process PHP by nginx

    a. In this case PHP files will be processed by Nginx , so if you want to add rewrite rules for PHP files then use "Additional nginx directives" section.

    b. Static files will be processed by Apache , if you want to add rewrite rules for HTML files then use "Additional Apache directives" section.

  3. Process PHP by Nginx is disabled, other options are enabled:

    • Smart static files processing
    • Serve static files directly by nginx

    a. In this case PHP files will be processed by Apache , so if you want to add rewrite rules for PHP files then use "Additional Apache directives" section.

    b. Static files will be processed by Nginx , if you want to add rewrite rules for HTML files then use "Additional nginx directives" section.

Have more questions? Submit a request
Please sign in to leave a comment.