Remove login.html

0
I am using the ForgotPassword module and the login page is configured in that module. I now want to completely get rid of the login.html page. I removed it from my theme, but Mendix automatically recreates it when deploying the app and then it obviously shows the default Mendix login page.   Is there a clean way of getting rid of that login.html? I basically want the https://mydomain/login.html to return a 404 or redirect to the root. I currently redirect from login.html to index.html using client side javascript, but it would be nice if you could just completely delete the login.html page if you do not need it.
asked
3 answers
5

Hi Bart,

Very good question, I would say: it's worth to post an idea on the forum, as it's not possibile (in a convenient way)!

Some files, even if they don't exist in the /theme folder, will be created automatically by the Mendix deployment process. When running locally, you will see these files (and maybe more) will be created in the /deployment/web folder:

  • index-example.html
  • index-phone-preview.html
  • index-rtl.html
  • index-tablet-preview.html
  • login.html

 

This mechanism locally is the same as building deployment packages online, containing these unnecessary files. Although it does not cause any security issues, it is not very professional / convenient either (if you know a website build on Mendix, you could look up the /index-phone-preview.html page...).

For some clients, I blocked the possibility to load these pages by explicitly excluding them on the Network tab of the environment details; this may be a suitable solution for you.

If you really want to exclude these pages, you could also build a deployment package locally (in Studio Pro: F7), set versioned on False and modify the .mda application package using a Zip File Manager before uploading and deploying it. The downside of this method may be clear: lots of effort and you lost proper version control (see screenshot below).

So, I would say: nice feature request!

 

answered
3

Hi,

 

Mendix will create a default login.html if it is not present in the theme folder.

I had to do something similar, if you create a login.html in your theme that does not start the Mendix client and just redirects to index.html it should work.

answered
0

Thanks Marcel and Johan. I ended up redirecting the login.html to the index.html and that indeed works nicely. Would indeed be a nice feature request. I will log it.

answered