After installing TeamViewer, I have changed the wampserver port to 8080, so the address is http://localhost:8080.
For the host file located at C:\WINDOWS\system32\drivers\etc\, I have also made the change as below
BEFORE
127.0.0.1 www.example.com
AFTER
127.0.0.1:8080 www.example.com
When I access www.example.com, it doesn't redirect to my wampserver, how can I fix it?
https://www.example.com
must go to port 8080? or to the default 443?(as it should) Which means: do you want a https also be redirected to port 8080 of your localhost? Or you do not care at all where this will be redirected? – Luannaluanne