简体   繁体   中英

DNS and apache redirection

I'm having issues to clearly manage my website redirection. Let say that I'd like to create a invisible redirect from www.siteA.com to www.siteB.com/content. Here you have what I'd like to have:

www.siteA.com --DNS--> www.siteB.com --Apache on siteB --> /wwww/content/siteA/

For the first part, I can do it using "CNAME" configuration at DNS level.

However, I'd like to have a kind of Apache rewrite rule on "www.siteB.com" machine in order to redirect to "/wwww/content/siteA/" only if we come from www.siteA.com DNS requests.

Any idea?

Did you look at apache virtual hosts http://httpd.apache.org/docs/2.2/vhosts/ ? It does exactly what you ask for as I understood it - at least the second part.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM