Search
 
SCRIPT & CODE EXAMPLE
 

PHP

ci base url dynamic

//open folder Application -> config -> config.php
//=============================================
// change $config['base_url'] = ''; code bellow
$root=(isset($_SERVER['HTTPS']) ? "https://" : "http://").$_SERVER['HTTP_HOST'];
$root.= str_replace(basename($_SERVER['SCRIPT_NAME']), '', $_SERVER['SCRIPT_NAME']);
$config['base_url'] = $root;

// change $config['index_page'] = 'index.php'; code bellow
$config['index_page'] = '';

// change $config['uri_protocol'] = 'PATH_INFO'; code bellow
$config['uri_protocol']	= 'REQUEST_URI';
//=============================================

// inside your folder project ci before floder Application
// create file ".htaccess" then write this code
RewriteEngine on
RewriteCond $1 !^(index.php|resources|robots.txt)
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php/$1 [L,QSA]
RewriteRule ^(.*)$ index.php?/$1 [L,QSA] 
Comment

PREVIOUS NEXT
Code Example
Php :: wordpress deactivate widgets gutenberg 
Php :: Diferencia entre dias PHP 
Php :: Php get all timezone 
Php :: php array order alphabetically 
Php :: Laravel stop on first validation error 
Php :: php if elseif 
Php :: symfony no php binaries detected 
Php :: how to get http parameters in php 
Php :: url() inside laravel config files 
Php :: curl post laravel 
Php :: load-styles.php 403 
Php :: php get last digit of number 
Php :: macos how host laravel website on localhost and intranet wifi 
Php :: ini_set php 
Php :: php append string 
Php :: how to show image in laravel 
Php :: specification migration laravel 
Php :: model hasmany laravel 
Php :: SoapClient Laravel 8 
Php :: laravel routes not working on production server 
Php :: laravel run all seeders 
Php :: laravel request get parameter 
Php :: wordpress get product category name by termid 
Php :: php timeout 
Php :: get curl httcode php 
Php :: laravel start que listener 
Php :: send json reponse php 
Php :: how to make model and controller in laravel 
Php :: php require 
Php :: Laravel Adding Cookie Consent 
ADD CONTENT
Topic
Content
Source link
Name
8+2 =