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. https://crt.sh/?q=example.com), so withholding your domain name here does not increase secrecy, but only makes it harder for us to provide help.

My domain is:
www.bayambangsystems.com
I ran this command:
I followed this link to setup ubuntu and install letsencrypt https://www.digitalocean.com/community/tutorials/how-to-secure-apache-with-let-s-encrypt-on-ubuntu-18-04
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:

See https://check-your-website.server-daten.de/?q=bayambangsystems.com#url-checks

Domainname Http-Status redirect Sec. G
http://bayambangsystems.com/
35.185.183.19 307 https://www.bayambangsystems.com/hr/users/login 0.610
http://www.bayambangsystems.com/ 35.185.183.19 307 https://www.bayambangsystems.com/hr/users/login 0.623
https://bayambangsystems.com/ 35.185.183.19 307 https://www.bayambangsystems.com/hr/users/login 6.810 N
Certificate error: RemoteCertificateNameMismatch
https://www.bayambangsystems.com/ 35.185.183.19 307 https://www.bayambangsystems.com/hr/users/login 6.530 B
https://www.bayambangsystems.com/hr/users/login 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

https://www.bayambangsystems.com/hr/users/login

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.

CN=www.bayambangsystems.com
	16.08.2020
	14.11.2020
expires in 90 days	www.bayambangsystems.com - 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.