Hi, we use InvoicePlane on our intranet server, and use standart web port, but now we need to use InvoicePlane over internet, we configure the access over secure port, using HTTPS, but we get this error: “The requested URL /sessions/login/ was not found on this server”
We use Linux + Apache.
Thanks for your help and ideas!
It looks like that the .htaccess mod_rewrite rule is broken.
My .htaccess looks like this:
# Remove index.php
RewriteEngine on
RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule . index.php [L]
RewriteCond %{SERVER_PORT} 80
RewriteRule ^(.*)$ https://url.de/$1 [R,L]
The last 2 Lines are redirecting normal unsecured Traffic (on port 80) to https://
Kovah
March 17, 2015, 7:06am
3
You can also use
RewriteCond %{HTTPS} off
RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI} [R=301,L]
which should be placed directly after RewriteEngine on
We are using a sub directory but the output is still href="http for the images and the css.
RewriteEngine on
RewriteCond %{HTTPS} ON
RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI}
RewriteBase /subdir
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule . index.php [L]
Kovah
August 18, 2015, 10:16am
5
Please try to set your domain including the https in /application/config/config.php
in $config['base_url']
Example: $config['base_url'] = 'https://demo.invoiceplane.com/'
Hi Kovah, thanks for your replys, but I got this error when I access to the url, I explain the steps:
enter to URL: https://facturacion.domain.com:6445/
alone “jump” to this URL: https://facturacion.domain.com:6445/sessions/login
but in main browser windows show this error: “Not Found The requested URL /sessions/login was not found on this server.”
Do you got some idea for this error?
We set the domain in config.php but also get the requested URL /sessions/login was not found on this server.
It jumps from the https://DOMAINNAME.com/SUBDIR
To https://DOMAINNAME.com/sessions/login
If we type https://DOMAINNAME.com/SUBDIR/sessions/login we get the login page
But the css and images are https://DOMAINNAME.com/assets/default/css/custom.css
Kovah
August 18, 2015, 12:01pm
8
then change it to $config['base_url'] = 'https://DOMAINNAME.com/SUBDIR/'
Yes we did that and got 500 serve errors and played around with the .htaccess settings but no luck.
Kovah
August 18, 2015, 2:00pm
10
That’s pretty weird as all assets are loaded with the base_url and even if you set a wrong one there should be no Error 500.
What is logged for the 500 error?
It’s working now thanks for the help Kovah.
I remover the line RewriteBase /subdir from .htaccess rebooted the server and cleared the browser cache.
The setup is:
/application/config/config.php
$config[‘base_url’] = ‘https://DOMAINNAME.com/SUBDIR/ ’
.htaccess
RewriteEngine on
RewriteCond %{HTTPS} ON
RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI}
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule . index.php [L]
Is there anything else that should be added to .htaccess ?
1 Like
Kovah
August 18, 2015, 3:08pm
12
No, if everything is working now you are good to go.
Kovah
Closed
August 19, 2015, 3:08pm
13
This topic was automatically closed after 24 hours. New replies are no longer allowed.