How to redirect non-www to www in apache and nginx web server August 5, 2021August 4, 2021 by Farshad Nick Introduction In some Cases you want to Redirect All request that Comes to your Root Website Configuration Nginx × Dismiss alert 1- Easily you can install APT-Cacher-ng by run Following Command : server { listen 80; server_name packops.dev; return 301 http://www.packops.dev$request_uri; } server { listen 80; server_name www.packops.dev; ... } Apache × Dismiss alert ServerName packops.com Redirect permanent / http://www.packops.dev/ ServerName www.packops.dev # real server configuration Conclution You Can Cache Packages , Speed UP Downloading Packages and Also Not Accessing Your Servers To the Internet By Simply Using APT Cacher-NG
Thanks
It was helpful for me