N
N
Nikita Peterson2017-01-26 21:44:29
htaccess
Nikita Peterson, 2017-01-26 21:44:29

How to redirect links from one domain to another?

There are several pages that need to be redirected to one page of another domain. You can write like this:

Redirect 301 /predlozhit-video http://example.com/contacts
Redirect 301 /sprashivaite http://example.com/contacts

But I want to simplify such code, as there are a lot of links. How to implement this using RewriteCond and RewriteRule?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
N
Nikita Peterson, 2017-01-26
@Designik_by

That's what I wanted)

RewriteCond %{REQUEST_URI} ^/predlozhit-video$ [OR]
RewriteCond %{REQUEST_URI} ^/sprashivaite$
RewriteRule ^(.*)$ http://example.com/contacts [R=301,L]

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question