My site is on wordpress.
This is the code I have written for hatccess file. But the redirection doesnot work. I want to force user redirect into www even if they donot write www inthe address bar. or click on a link which does not have www on it.
So I have added the following 301 redirection at the top of htacess file. but the redirection does not work. it only works with the home page. but not with the other pages. With the home page it works probably because I have set the site url = https://www.inetplc.com
Redirect 301 http://inetplc.com/ https://www.inetplc.com
Redirect 301 http://www.inetplc.com/ https://www.inetplc.com
Redirect 301 https://inetplc.com/ https://www.inetplc.com
Redirect 301 https://inetplc.com/case-studies https://www.inetplc.com/case-studies
Redirect 301 https://inetplc.com/about-inet https://www.inetplc.com/about-inet
I have tried configuring the lines like the following. but then the whole page is down. I dont know why.
Redirect 301 /about-inet https://www.inetplc.com/about-inet
This is the rest of the code in htaccess file.
#This Apache config file was created by Duplicator Installer on 2019-07-19 09:20:24.
#The original can be found in archived file with the name htaccess.orig
# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>
# END WordPress
I wrote the code to enable keep alive it also did not work . so I removed that .
# Keep Alive
<ifModule mod_headers.c>
Header set Connection keep-alive
</ifModule>
What I am doing wrong? Wordpress version 5.2.2