B
B
barabashechka2014-05-12 15:14:26
linux
barabashechka, 2014-05-12 15:14:26

How to make apache redirect without automatic replacement of address bar in browser?

Good afternoon. The problem is this:
There is a 2nd level domain: test.aaa.com
There is a redirect to the 1st level domain in the virtual host:
aaa.com/online/index.html

<VirtualHost X.X.X.X>
        ServerName test.aaa.com
        ServerAlias www.test.aaa.com
        redirect 301 /   http://aaa.com/online/index.html
</VirtualHost>

During the transition, the link to "aaa.com/online/index.html" itself changes in the address bar of the browser.
All subsequent requests (links) from the page aaa.com/online/index.html will have the structure aaa.com/online/27/XXX.html
Is it possible to make sure that the address of the 2nd level domain always remains in the browser line - " test.aaa.com"?
Thank you.

Answer the question

In order to leave comments, you need to log in

2 answer(s)
V
Vadim Yakovlev, 2014-05-12
@FrimInc

Why not add test.aaa.com to the ServerAlias ​​of aaa.com ?

V
Vlad Zhivotnev, 2014-05-12
@inkvizitor68sl

Either you want proxying (and it's better to do it in nginx via proxy_pass), or you just need to add ServerAlias

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question