Keep Server Online
If you find the Apache Lounge, the downloads and overall help useful, please express your satisfaction with a donation.
or
A donation makes a contribution towards the costs, the time and effort that's going in this site and building.
Thank You! Steffen
Your donations will help to keep this site alive and well, and continuing building binaries. Apache Lounge is not sponsored.
| |
|
Topic: Rewrite rules for non-hosted domain |
|
Author |
|
divekeys
Joined: 01 Jul 2015 Posts: 2 Location: usa, chicago
|
Posted: Wed 01 Jul '15 22:06 Post subject: Rewrite rules for non-hosted domain |
|
|
CentOS 6. Apache 2.2.15
I am trying to redirect a request from a non-hosted domain, using a rewrite rule in our configuration file in conf.d. Our registrar has a pointer from this non-hosted domain to our domain.
Currently
*.domain1.com.vn -> http://www.domain1.com
domain1.com.vn -> http://domain1.com
I want to redirect a request like so in the web.conf file in conf.d
domain1.com.vn/terms => domain2.com/vn/terms
I am fairly new to apache so I'll do my best to fill in any additional needed info. Thanks |
|
Back to top |
|
James Blond Moderator
Joined: 19 Jan 2006 Posts: 7371 Location: Germany, Next to Hamburg
|
Posted: Thu 02 Jul '15 16:30 Post subject: |
|
|
You may post your rewrite rule. |
|
Back to top |
|
divekeys
Joined: 01 Jul 2015 Posts: 2 Location: usa, chicago
|
Posted: Thu 02 Jul '15 18:46 Post subject: |
|
|
So we found that the way the registrar was set up. It pointed the non-hosted domain to our URL instead of a the VIP the servers used. I believe this was bypassing the servers conf file. Once this goes into effect in 24 hours. I think I can add a either a vhost entry in the current conf file. OR would I be better off creating a new separate conf file specifically for the domain1.com.vn? |
|
Back to top |
|
James Blond Moderator
Joined: 19 Jan 2006 Posts: 7371 Location: Germany, Next to Hamburg
|
Posted: Wed 08 Jul '15 22:59 Post subject: |
|
|
I do recommend to have separated config files, for each vhost. But it works also to have it all in one big file. |
|
Back to top |
|
|
|
|
|
|