disculpe pero como hago para que si alguien sepe la ip le rediriga al dominio por ejemplo pone la ip -> 17.1321.1231.1 -> se vaya a example.com y no se quede en 12-23-1.132
These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.
Click below to sign up and get $100 of credit to try our products over 60 days!
Hi @proyectszonaentrenamient,
You can achieve this with a rewrite in an htaccess file in your DocumentRoot directory. Go to the folder
In the folder, you should have a configuration file named
000-default.conf
. You will need to be sure that your 000-default.conf file has AllowOverride All set for the DocumentRoot directory so the settings in your htaccess file will be used. Then you will want to create an .htaccess file in that directory with the following (replacing the IP and domain with your own):once this is done, make sure the rewrite module is enabled:
and restart apache
Regards, KFSys