Link to home
Start Free TrialLog in
Avatar of A A
A A

asked on

I need to redirect any http://www .domain.com site to http ://domain.com and https://www.domain.com to https://domain.com by using apache config or aws loadbalancer

Hi experts
I have website as ec2  on aws and loadbalancer  that is working only on http://domainname.com and https://domain.com
but is not working with( www) so  not working  on both  http:// www.domainname.com and  https://www.domainname.com, so I am thinking to make redirection from https://www.domainname.com to https://domainname.com and from http://www.domainname.com to http://domainanme.com  through  apache config ht access or Aws loadbalancer.

waiting for your kind advice
Avatar of David Favor
David Favor
Flag of United States of America image

Use Apache config, so if you move your sites, your redirect will continue working correctly.
Avatar of A A
A A

ASKER

HI David
could you please to let me know how can be done  as I heard about 301 and rewrite condition so 1-could you please give me exact syntax as when I did it did not work  2- is there command to let me know issue in redirection without test in browser.  3-as I heard lso that it can be done through dns route if you could let me know . waiting for your kind answer regarding 1,2,3.
ASKER CERTIFIED SOLUTION
Avatar of David Favor
David Favor
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial