Rewrite not working while using Codeigniter

Please fill out the fields below so we can help you better. Note: you must provide your domain name to get help. Domain names for issued certificates are all made public in Certificate Transparency logs (e.g., so withholding your domain name here does not increase secrecy, but only makes it harder for us to provide help.

My domain is:
I ran this command:
I followed this link to setup ubuntu and install letsencrypt
It produced this output:
It’s okay with basic PHP app, but the rewrites don’t work. when I tried to configure the vhost conf, the rewrite works but the website no longer displays https.
My web server is (include version):
Ubuntu 18.04 LAMP
The operating system my web server runs on is (include version):
Ubuntu 18.04
My hosting provider, if applicable, is:
Google Cloud Compute Engine
I can login to a root shell on my machine (yes or no, or I don’t know): Yes

I’m using a control panel to manage my site (no, or provide the name and version of the control panel): No

The version of my client is (e.g. output of certbot --version or certbot-auto --version if you’re using Certbot): 0.31.0

Hi @rbulalakaw

I have no idea how Codeigniter works.

But checking your domain there are redirects:


Domainname Http-Status redirect Sec. G 307 0.610 307 0.623 307 6.810 N
Certificate error: RemoteCertificateNameMismatch 307 6.530 B GZip used - 2042 / 7119 - 71,32 % Inline-JavaScript (∑/total): 6/30 Inline-CSS (∑/total): 1/152 200 Html is minified: 193,77 % 5.407 B

Not good (because first should be redirected from http to https with the same domain name), but in the end, all users have the

May be your browser has a wrong cache. With browsers, it may be impossible to check redirects. That’s a reason using online tools, they start new again and again.

Critical: Your non-www has the wrong certificate.
expires in 90 days - 1 entry

Create one certificate with both domain names (non-www and www) and use that.

1 Like

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.