Search
 
SCRIPT & CODE EXAMPLE
 

PHP

dynamic base url

//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 :: header redirect php 
Php :: How to list notification from database 
Php :: xampp pdoexception could not find driver 
Php :: curl outline in laravel 
Php :: only fetch specific array keys php 
Php :: Définir un nombre maximum de mots sur les titres des publications WordPress 
Php :: Problems with Special Characters between Angular http post and PHP 
Php :: ph form 
Php :: PHP strcasecmp — Binary safe case-insensitive string comparison 
Php :: php find longest string in array 
Php :: php resize 
Php :: build_Assoc 
Php :: how to save snap in webcap in php codeigniter 
Php :: what is WP_USE_THEMES 
Php :: extract date from datetime object in php 
Php :: to redo number_format php 
Php :: redaxo urlgenerator 
Php :: php sort multidimensional array by child value 
Php :: selecting a time zone from a drop-down list 
Php :: atom emmet php 
Php :: when WYSIWYG fields remove paragraph tag 
Php :: laravel collection min 
Php :: import csv laravel 8 
Php :: haseeb php code 
Php :: How to display limited post content in WordPress 
Php :: laravel model where set fields laravel 
Php :: laravel model retrieve 
Php :: select next occurrence phpstorm 
Php :: publish laravel scout 
Php :: laravel migration add column first 
ADD CONTENT
Topic
Content
Source link
Name
7+7 =