URL

Seme Framework has some configuration for Uniform Resource Locator (URL).

Base URL

Base URL is required for avoiding mismatch target to a page, image, etc.

The base url configuration existed on $site variable.

Same as version 3.x.x the value of must be ended by trailing slash.

Example:

$site = "http://localhost/seme-framework/";
$site = "https://www.example.com/";
$site = "http://localhost:8080/";

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.

Admin Secret URL

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 = "manajer";

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.