Ask, reply and learn. Join the community of Akaunting.
If you are running Akaunting on a www.example.com domain:
<IfModule mod_rewrite.c>
RewriteEngine on
RewriteCond %{HTTPS} off [OR]
RewriteCond %{HTTP_HOST} !^www\. [NC]
RewriteRule (.*) https://www.example.com%{REQUEST_URI} [NE,L,R=301]
</IfModule>
If you are running Akaunting on a app.example.com subdomain:
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteCond %{HTTPS} off
RewriteRule ^(.*)$ https://app.example.com%{REQUEST_URI} [L,R=301]
RewriteCond %{HTTP_HOST} ^www\.(.+)$ [NC]
RewriteRule ^ https://%1%{REQUEST_URI} [R=301,L]
</IfModule>
If you are running Akaunting on a example.com domain:
<code>
<IfModule mod_rewrite.c>
RewriteEngine on
RewriteCond %{HTTPS} off [OR]
RewriteCond %{HTTP_HOST} ^www\. [NC]
RewriteRule (.*) https://example.com%{REQUEST_URI} [R=301,L]
</IfModule>
<code>
You may try this: http://stackoverflow.com/a/28403907/610880
Will consider to add to the next version.
Thanks for the update Denis.
As I am not very familiar (yet) with Laravel I just want to make sure it's a 301 Moved Permantly redirect and not a 302 Found.
This worked for me:
http://stackoverflow.com/a/28403907/610880
Thanks, the below you provide work for me.
RewriteEngine On
RewriteCond %{HTTPS} off
RewriteRule ^(.*)$ https://app.example.com%{REQUEST_URI} [L,R=301]
RewriteCond %{HTTP_HOST} ^www\.(.+)$ [NC]
RewriteRule ^ https://%1%{REQUEST_URI} [R=301,L]
Showing 1 to 6 of 6 discussions