(08-10-2018, 04:41 PM)yusha Wrote: I think we don't have to wait for the next update. I figured it out.
Here's what you have to do. go to
and editCode:/etc/sentora/panel/modules/sub_domains/code/
and just comment out this code with /* */ at line 218Code:controller.ext.php
Code:// Check to make sure the domain is in the correct format before we go any further...
if (strpos($domain, 'www.') === 0) {
self::$error = TRUE;
return FALSE;
}
Now you'll be able to add www.subdomain.yoursite.com as an individual subdmoain and can create a new directory and redirect that page into the one without www using this code as your index for that newly created directory
or can assign that domain to the existing directory of your subdomain.Code:<?php
if(!strstr($_SERVER['HTTP_HOST'],'www.'))
return;
header('HTTP/1.1 301 Moved Permanently');
header('Location: http://'.substr($_SERVER['HTTP_HOST'],4).$_SERVER['REQUEST_URI']);
exit();
?>
Nice, glad you figured it out. I'll be testing it later after I finish my work.
Good day!
***********************************************
SAMUEL AVOLA MUNGUJAKISA *
CEO, Bero Computers *
www.berocomputers.com *
+256754086797 *
+256780585402 *
***************************** *
SAMUEL AVOLA MUNGUJAKISA *
CEO, Bero Computers *
www.berocomputers.com *
+256754086797 *
+256780585402 *
***************************** *