A
A
AJ2012-03-23 13:35:20
Apache HTTP Server
AJ, 2012-03-23 13:35:20

How to make a redirect automatic on the full URL?

Hello.
The question is this:
I have domains xxx.ru and yyy.ru
xxx.ru - the main one and it has all the stuffing of the site, yyy.ru - auxiliary, in case of errors. So I want a complete link redirect.
What for? Because the links I have are very CNC and you can not even use the search on the site. I just entered the name in the URL and that's it.
So I want that if the visitor enters yyy.ru/marker.html, then he would get to
xxx.ru/marker.html
/ is removed automatically. How can I make my urls active at both addresses?
I tried RedirectMatch - it didn’t work out for me, most likely - crooked hands.

Answer the question

In order to leave comments, you need to log in

2 answer(s)
M
MastaEx, 2012-03-23
@MastaEx

If using the Apache mod_rewrite, then like this:

RewriteCond %{HTTP_HOST} yyy.ru
RewriteRule (.*) http://xxx.ru/$1 [R=301,L]

A
AJ, 2012-03-26
@2ball

does not work, sculpts without a slash, as in the case of RedirectMatch ...

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question