D
D
Darklez2017-01-14 16:12:27
Apache HTTP Server
Darklez, 2017-01-14 16:12:27

How to make a 301 redirect in wordpress multisite?

Good afternoon.
Essence of a question:
There is a site created through wp multisite - doma.in/site1. I want to rename it to doma.in/website123.
How to make a 301 redirect so that all internal links redirect to a new site.
For example, to: doma.in/site1/sub1/sub2/ redirect to doma.in/website123/sub1/sub2/?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
D
Darklez, 2017-01-15
@Darklez

Was able to find the answer, maybe someone will be grateful:

RewriteEngine On
RewriteCond %{HTTP_HOST} ^doma.in
RewriteCond %{REQUEST_URI} ^.*site1.*
RewriteRule ^site1/(.*)$ https://doma.in/website123/$1? [R=301,L]

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question