.htaccess is being forefully used for localhost
问题 I am using wamp-server as on localhost with a virtual host named www.xyz.com i have a deployment service set through git which deploys code to server on www.xyz.in This is my .htaccess code RewriteEngine on RewriteCond %{HTTP_HOST} !^www\. [NC,OR] RewriteCond %{HTTPS} off RewriteCond %{HTTP_HOST} ^(?:www\.)?(.+)$ [NC] RewriteRule ^ https://www.%1%{REQUEST_URI} [R=301,L,NE] The above code will make your domain to add https prefix The problem with this code is that on server the code works