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 :: symfony schema update 
Php :: magento2 zend log 
Php :: laravel artisan clear cache 
Php :: info.php 
Php :: php reverse shell one liner 
Php :: list all files in directory php 
Php :: how to create random alphanumeric in php 
Php :: is frontpage wordpress 
Php :: php redirect in seconds 
Php :: php number padding 
Php :: php supress errors 
Php :: display wp shortcode by php 
Php :: the requested PHP extension curl is missing from your system. 
Php :: wordpress get theme uri 
Php :: Example wp-config.php for Debugging 
Php :: php time script 
Php :: php filter_var boolean 
Php :: get page title wordpress 
Php :: php loop 
Php :: {{Str::limit laravel 
Php :: php loop through every day of the year 
Php :: woocommerce get my account url 
Php :: how to remove text tab in wordpress editor 
Php :: how to get category from post id 
Php :: php code for getting the next day 
Php :: date php 
Php :: get wordpress page link by id 
Php :: php foreach string char 
Php :: php exec shell command 
Php :: laravel old request hmtl select 
ADD CONTENT
Topic
Content
Source link
Name
4+2 =