Trongate PHP Framework Docs
Introduction
Basic Concepts
Understanding Routing
Intercepting Requests
Module Fundamentals
Database Operations
Templates
Helpers
Form Handling
Form Validation
Working With Files
Image Manipulation
Working With Dates & Times
Language Control
Authorization & Authentication
Tips And Best Practices

Hiding The Admin Login URL

When you initially install Trongate, your admin login URL is:

The following shorter URL also works:

Hackers know this. You do not want them knocking.

So, let us fix it.


Step 1: Pick your secret word

Choose something random but memorable. No spaces. No special characters. Use a single, made-up word that you can remember.

Example:

Your new admin login URL becomes:


Step 2: Update custom routing

Open config/custom_routing.php. You should see something like this:

Replace both occurrences of tg-admin with your secret word. For example:


Step 3: Lock the back door

Open:

Around line 12 you will see this commented line:

Uncomment it and replace tg-admin with your secret word:


Congratulations!

Now:

  • trongate_administrators/login - returns 404.
  • tg-admin - no longer works.
  • Only your secret URL (fantasticola) grants access.