Score:0

Page redirection not working

us flag
RewriteEngine On
RewriteCond %{HTTP_HOST} ^example.com
RewriteRule (.*) https://www.example.com/$1 [R=301,L]

with the help of the above code, I am able to redirect https://example.com/ to https://www.example.com/

but when I open https://example.com/page.html in the browser it doesn't redirect to https://www.example.com/page.html

I am using www in canonical tag, and sitemap.xml but Google still indexes the wrong URL (the one without www url) so I want when the user opens (https://example.com/page.html ) it should redirect to (https://www.example.com/page.html).

us flag
What does "not working" mean here? Please post exact request, expected result and actual result.
mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.