Cockpit cms 404 redirect

308 views Asked by At

My website is hosted over cpanel: http://123.22.111.33/~folder/

When I try to access cockpit cms: http://123.22.111.33/~folder/cockpit

I've got 404 error, but URL is changed to: http://123.22.111.33/auth/login

I have rewrite rules, but they are not working properly.

RewriteEngine On
RewriteCond %{HTTP_HOST} !^www.
RewriteRule ^(.*)$ https://www.%{HTTP_HOST}/$1 [R=301,L]
RewriteCond %{HTTPS} !=on
RewriteRule ^ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]

These settings are working on different domains, where cockpit is placed in root folder and not hosted over cpanel. This error redirect is probably caused by "~" character.

0

There are 0 answers