There seems to be a problem in your host file. If you are using apache, modify your host file, for example:
<VirtualHost *:443> ServerAdmin admin@example.com DocumentRoot /path ServerName xyz.mydomain.com ServerAlias www.xyz.mydomain.com SSLEngine On SSLOptions +StrictRequire SSLCertificateFile /path to ssl file/mydomain.crt SSLCertificateKeyFile /path to ssl file/mydomain.key SSLProtocol TLSv1 <Directory "/path"> Require all granted Options -FollowSymLinks -Includes -ExecCGI -Indexes AllowOverride All Order allow,deny Allow from all </Directory> RewriteEngine On </VirtualHost>
Now select the htaccess file, for example:
<IfModule mod_rewrite.c> Options +FollowSymLinks RewriteEngine On RewriteCond %{SERVER_PORT} 80 RewriteRule ^(.*)$ https://xyz.mydomain.com/$1 [R=301,L] RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule ^(.*)$ index.php/$1 [L] </IfModule>
Happy coding :)
Sujeet kumar
source share