URL Configuration

URL or Uniform Resource Locator settings are in the Seme Framework because they relate to how the Seme Framework will be opened or run.

Base URL

Base URL settings are needed to determine the base URL of a Web built on Seme Framework. This Base URL will be a reference for each URL that will be placed in the resulting response.

This base URL setting is in app/config/development.php in the $site variable section.

Caution

Starting from Seme Framework version 3.0.0, the content of the $site value must be terminated (suffix) with a slash "/".

Here is some examples for $site value:

$site = "http://localhost/seme-framework/";
$site = "https://www.example.com/";
$site = "http://localhost:8080/";
$site = "http://".$_SERVER['HTTP_HOST']."/seme_framework/";

Base URL with custom port

if using $_SERVER['HTTP_HOST'] there is no necessary to add suffix port after it.

Accessing base URL ($site) value

The base_url() global function is for returning value of $site.

Special URL for Admin

The special base url configuration for admin that point to app/controller/admin/*.

The default value is $admin_secret_url = 'admin';.

This is will relative to $site value.

Example:

$admin_secret_url = "admin";
$admin_secret_url = "boss";
$admin_secret_url = "manager";

Accessing the secret admin URL ($admin_secret_url) value

The base_url_admin() global function is for returning value of $site.$admin_secret_url.

URL Routing Method

The url routing method existed on $method, same as version 3.x.x the value consists of REQUEST_URI,PATH_INFO, and ORIG_PATH_INFO.

REQUEST_URI

The REQUEST_URI value suitable for NGINX, Apache on deployment server, LiteSpeed, etc.

PATH_INFO

The PATH_INFO value suitable for XAMPP development environtment.

ORIG_PATH_INFO

The ORIG_PATH_INFO value is for another server configuration.

CDN URL

The special base url for Content Delivery Network url.

The default value is $cdn_url = '';

Example:

$cdn_url = "http://cdn.cenah.co.id/seme-framework/";

Accessing the CDN URL ($cdn_url) value

The $this->cdn_url() method form SENE_Controller class is for returning value of $cdn_url value.