*

Smithtech

  • ****
  • 219 posts
How can I change OC-ADMIN url for security reasons?
« on: June 18, 2021, 12:36:50 AM »
How can I change OC-ADMIN url for security reasons?
Want to change my oc-admin URL for security reasons, please, how can I do that?

*

MB Themes

Re: How can I change OC-ADMIN url for security reasons?
« Reply #1 on: June 18, 2021, 07:38:15 AM »
@support
It should work ok, if you simply rename folder name, but there are references to "oc-admin" i.e. in hDefines.php to backoffice URL:
Code: [Select]
function osc_admin_base_url($with_index = false) {
  $path  = osc_base_url() . 'oc-admin/';

  // add the index.php if it's true
  if($with_index) {
    $path .= 'index.php';
  }

  return osc_apply_filter('admin_base_url', $path, $with_index);
}

It would be nice feature in future, but keep in mind that changing oc-admin may lead to problems with plugins... problems that they refer to oc-admin in their configuration pages.
  To get fast support, we need following details: Detail description, URL to reproduce problem, Screenshots

*

Smithtech

  • ****
  • 219 posts
Re: How can I change OC-ADMIN url for security reasons?
« Reply #2 on: June 22, 2021, 11:32:50 AM »
Thank you very much for your reply. However, I'm not sure where to put the code:

Code: [Select]
function osc_admin_base_url($with_index = false) {
  $path  = osc_base_url() . 'oc-admin/';

  // add the index.php if it's true
  if($with_index) {
    $path .= 'index.php';
  }

  return osc_apply_filter('admin_base_url', $path, $with_index);
}

*

MB Themes

Re: How can I change OC-ADMIN url for security reasons?
« Reply #3 on: June 22, 2021, 03:07:05 PM »
@support
Will be implemented in easier way in 4.5
  To get fast support, we need following details: Detail description, URL to reproduce problem, Screenshots

*

dsf

  • *****
  • 261 posts
Re: How can I change OC-ADMIN url for security reasons?
« Reply #4 on: June 24, 2021, 12:55:30 AM »
Well this was talked so many times in the old forums of Osclass org.

Security by obscurity.

Useless. Totally useless.

There is no protection by renaming or hiding any admin login. There are so many other areas you can he hacked. I bet the most of the webmasters do not even use SSL with their pop3/smtp email.


https://stackoverflow.com/questions/533965/why-is-security-through-obscurity-a-bad-idea
« Last Edit: June 24, 2021, 12:59:28 AM by dsf »