Search
 
SCRIPT & CODE EXAMPLE
 

PHP

how to remove public from url in codeigniter 4

// codeigniter-4

-----------------------------------
 Step 1: Change in App.php File
-----------------------------------
  public $baseURL = 'http://localhost:8080';

  To

  public $baseURL = 'http://localhost/your_project_name/';
  
  * And the second change in the app.php file:
  
  public $uriProtocol = 'REQUEST_URI';

  To

  public $uriProtocol = 'PATH_INFO';
  
--------------------------------------  
 Step 2: Copy index.php and .htaccess
--------------------------------------
--> Visit inside public directory. And 
	copy index.php and .htaccess to codeigniter app root directory.

------------------------------    
 Step 3: Change In index.php    
------------------------------
 $pathsPath = FCPATH . '../app/Config/Paths.php';

 change TO

 $pathsPath = FCPATH . 'app/Config/Paths.php';
Comment

Remove public from the url in the codeigniter

$pathsPath = realpath(FCPATH . '../app/Config/Paths.php');
replace by
$pathsPath = realpath(FCPATH . '../app/Config/Paths.php');
Comment

PREVIOUS NEXT
Code Example
Php :: delete multiple row by model in laravel 
Php :: use id as key in co;lection laravel 
Php :: php global variable function 
Php :: check if elquent retrun empty array laravel 
Php :: laravel convert eloquent collection to collection 
Php :: make table in laravel 
Php :: php array append 
Php :: create storage link laravel without terminal server 
Php :: tinyinteger laravel +size 
Php :: php now 
Php :: how to store file in public folder laravel 
Php :: echo all php global variables 
Php :: php email attachment and message 
Php :: php add to existing associative array 
Php :: add access-control-allow-origin header laravel 
Php :: creating thumbnail in codeigniter 
Php :: how validate the value of object in arraye in laravel 
Php :: Add ... if string is too long PHP 
Php :: laravel create project with auth 2021 
Php :: convert time to 24 hour format laravel 
Php :: php postgresql number of rows 
Php :: laravel job delay dispatch 
Php :: insert data using seeder in laravel 
Php :: laravel make model all with resources api 
Php :: php get part of string 
Php :: Remove the Breadcrumbs on the Shop Entirely 
Php :: laravel create resource controller 
Php :: encrypt & decrypt laravel 
Php :: laravel detach 
Php :: limiting requests to controllers in laravel 
ADD CONTENT
Topic
Content
Source link
Name
2+7 =