Enabling HTTPS Or SSL For RetailMan ERP System
Use HTTPS to secure traffic between users and RetailMan ERP System. Before forcing HTTPS in the application, make sure a valid SSL certificate is already installed for your domain or subdomain.
Before You Start
-
Confirm the SSL certificate is installed on the server.
-
Open your domain using HTTPS:
https://yourdomain.com -
Confirm the browser shows the secure lock symbol.
-
Continue only after HTTPS works directly.
If HTTPS does not open correctly, fix the SSL certificate first through your hosting panel, server control panel, or hosting provider.
Force HTTPS Redirect
If your installation uses Apache and the application root contains a .htaccess file, you can force all HTTP requests to HTTPS.
- Open the
.htaccessfile in the application codebase. - Back up the existing
.htaccesscontent before changing it. - Add the HTTPS redirect rules above the public-folder rewrite rule.
Example:
RewriteEngine On
RewriteCond %{HTTPS} !=on
RewriteRule ^ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]
RewriteRule ^(.*)$ public/$1 [L]
- Save the file.
- Open the
.envfile. - Update
APP_URLso it useshttps.
Example:
APP_URL=https://yourdomain.com
- Clear application/browser cache if needed.
- Open the application again and confirm it redirects to HTTPS.
Notes
- Use your real domain or subdomain in
APP_URL. - Do not force HTTPS until the SSL certificate is working.
- If your server points directly to the
publicfolder, the rewrite rules may be different. - If you use Nginx, configure HTTPS redirects in the Nginx server block instead of
.htaccess.