• Hi, I have 2 site hosted in Windows and Linux shared hosting and both have same setting in dns ie A record mapped to IP for Naked Url and www as Cname to A record. have no other mod or .htaccess setting specific to url redirection. but one of them which is on windows retain the url you open it with, ie I can use www and non-www url to open my site but in Linux it redireect to the url that I have setup in Settings->general->site field.

    Site 1st URL is lgagro.com.sg(Linux host) if browsed without https://www., it redirects to https://www.lgagor.com.sg.I have .htaccess file in root folder which is as such:

    <IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteBase /
    RewriteRule ^index\.php$ – [L]
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule . /index.php [L]

    The site URL is set to https://www.lgagro.com.sg, I also tried with https://lgagro.com.sg and it works just fine.
    Now 2nd site https://shashwatinternational.com (Windows host) this one keep the url I open it with, ie it retain the url www and non-www
    site url is set to https://shashwatinternational.com in settings.
    Any suggestion why they behave differently, is it possible to have https://shashwatinternational.com work out like that of lgagro.com.sg

    Any suggestion will be helpful.
    Thanks.

  • The topic ‘cannonical url behaviour on windows and linux server installation’ is closed to new replies.