Vesta Control Panel - Forum

Community Forum

Skip to content

Advanced search
  • Quick links
    • Main site
    • Github repo
    • Google Search
  • FAQ
  • Login
  • Register
  • Board index Main Section Web Server
  • Search

What is the cleanest way to add a list of redirects in Vesta CP ?

Questions regarding the Web Server
Apache + Nginx, Nginx + PHP5-FPM
Post Reply
  • Print view
Advanced search
2 posts • Page 1 of 1
thibaut
Posts: 7
Joined: Thu May 10, 2018 1:00 am

Os: Ubuntu 15x
Web: apache + nginx
What is the cleanest way to add a list of redirects in Vesta CP ?
  • Quote

Post by thibaut » Wed Sep 26, 2018 1:36 pm

Hi,

I moved my site from Wordpress to Mediawiki and I have several 301 redirects to make.

Basically :

Code: Select all

Redirect permanent 12345/old-wordpress-permalink wiki/new_article_title
I also merged another old site in this one so that I also have this type of redirect to make :

Code: Select all

Redirect permanent https://myolddomain.com/12345/old-wordpress-permalink2 https://mynewdomain.com/wiki/new_article_title2
The old domain was in another server and, since I have to close the old sever, I had in the idea to redirect the old domaine on the new sever IP and to add the old domain as an alias of the new domain in Vesta.

What would be the cleanest way to implement these 3 points in VestaCP in your opinion ?

Thanks
Top

demian
Posts: 543
Joined: Thu May 16, 2013 5:19 am

Re: What is the cleanest way to add a list of redirects in Vesta CP ?
  • Quote

Post by demian » Mon Oct 01, 2018 10:57 am

use nginx rewrite

add an additional file /home/user/conf/nginx.you_site.conf

Code: Select all

location ~ /12345/old-wordpress-permalink2 {rewrite ^ https://mynewdomain.com/wiki/new_article_title2 last;}
Top


Post Reply
  • Print view

2 posts • Page 1 of 1

Return to “Web Server”



  • Board index
  • All times are UTC
  • Delete all board cookies
  • The team
Powered by phpBB® Forum Software © phpBB Limited
*Original Author: Brad Veryard
*Updated to 3.2 by MannixMD
 

 

Login  •  Register

I forgot my password