We all know how to rewrite all non www into www using following code in htaccess
But how to re-write "one" / single URL with no www into www?
I need only one URL to re-write with "WWW" without affecting all URLs.
Eg:
This cannot do using redirect, because it makes a loop.
Code:
RewriteEngine On
RewriteCond %{HTTP_HOST} !^www\. [NC]
RewriteRule ^(.*)$ https://www.%{HTTP_HOST}/$1 [R=301,L]
But how to re-write "one" / single URL with no www into www?
I need only one URL to re-write with "WWW" without affecting all URLs.
Eg:
Code:
https://example.com/sitemap.xml -----> https://www.example.com/sitemap.xml
This cannot do using redirect, because it makes a loop.
