Using breadcrumb url’s

  breadcrumbs, php

I have developed a website that has a lot of files.
I have made a directory for them and put it there.

i need to know if i can make a Custom url path so that my community to see the url,
https://mywebsite.com instead of https://mywebsite.com/modules/webview/pages/index.php.

And i also want that is users type in https://mywebsite.com/forum for example so takes them to,
https://mywebsite.com/modules/webview/addons/forum and then still display https://mywebsite.com/forum

Thank you.

I am using Smarty on my website.

Here is the contents of my config file if it helps.

<?php
session_start();
$conn = new mysqli("localhost", "root", "", "dev");
if ($conn->connect_error) {
    die("Connection failed: " . $conn->connect_error);
}
   define ('ROOT_PATH', realpath(dirname(__FILE__)));
   define ('INCLUDE_PATH', realpath(dirname(__FILE__) . '/includes' ));
   define('BASE_URL', 'http://localhost/');

function getMultipleRecords($sql, $types = null, $params = []) {
 global $conn;
 $stmt = $conn->prepare($sql);
 if (!empty($params) && !empty($params)) {
    $stmt->bind_param($types, ...$params);
  }
  $stmt->execute();
  $result = $stmt->get_result();
  $user = $result->fetch_all(MYSQLI_ASSOC);
  $stmt->close();
  return $user;
}
function getSingleRecord($sql, $types, $params) {
  global $conn;
  $stmt = $conn->prepare($sql);
  $stmt->bind_param($types, ...$params);
  $stmt->execute();
  $result = $stmt->get_result();
  $user = $result->fetch_assoc();
  $stmt->close();
  return $user;
}
function modifyRecord($sql, $types, $params) {
  global $conn;
  $stmt = $conn->prepare($sql);
  $stmt->bind_param($types, ...$params);
  $result = $stmt->execute();
  $stmt->close();
  return $result;
}
?>

Source: Ask PHP

LEAVE A COMMENT