Set Base URL in config file in Codeigniter
$config['base_url'] = "https://".$_SERVER['HTTP_HOST'];
$config['base_url'] .= preg_replace('@/+$@', '', dirname($_SERVER['SCRIPT_NAME'])).'/';
$config['index_page'] = '';
//Wirite below code in .htaccess file
RewriteEngine on
RewriteCond $1 !^(index\.php|public|\.txt)
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php?$1
RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization},L]
Comments
Post a Comment