Welcome Guest, Not a member yet? Register   Sign In
Return URI Segment
#18

[eluser]LuckyFella73[/eluser]
Hi Rash,

on some webservers it can be a bit tricky to set up the
.htaccess in the right combination with uri_protocol in
config.php

Your welcome controller is working - I'm quite sure you
just have to configurate the .htaccess and uri_protocol.

Just a usefull snippet I found in these forums for config.php:

Code:
/*
|--------------------------------------------------------------------------
| Base Site URL
|--------------------------------------------------------------------------
|
| URL to your CodeIgniter root. Typically this will be your base URL,
| WITH a trailing slash:
|
| http://example.com/
|
| If this is not set then CodeIgniter will guess the protocol, domain and
| path to your installation.
|
*/
if(isset($_SERVER['HTTP_HOST']))
{
$config['base_url'] = isset($_SERVER['HTTPS']) && strtolower($_SERVER['HTTPS']) == 'on' ? 'https' : 'http';
$config['base_url'] .= '://'. $_SERVER['HTTP_HOST'];
$config['base_url'] .= isset($_SERVER['SERVER_PORT']) && $_SERVER['SERVER_PORT'] != '80' ? ( ':'.$_SERVER['SERVER_PORT'] ) : '';
$config['base_url'] .= str_replace(basename($_SERVER['SCRIPT_NAME']), '', $_SERVER['SCRIPT_NAME']);
}
else
{
$config['base_url'] = 'http://localhost/your_project/';
}

When uploading your project you don't have to think about setting the base_url
anymore.

Try different .htaccess examples and try each possible uri_protocol when checking
a .htaccess.

Cheers


Messages In This Thread
Return URI Segment - by El Forum - 06-25-2012, 10:47 PM
Return URI Segment - by El Forum - 06-26-2012, 02:50 AM
Return URI Segment - by El Forum - 06-26-2012, 04:00 AM
Return URI Segment - by El Forum - 06-26-2012, 04:03 AM
Return URI Segment - by El Forum - 06-26-2012, 04:13 AM
Return URI Segment - by El Forum - 06-26-2012, 05:41 AM
Return URI Segment - by El Forum - 06-26-2012, 05:45 AM
Return URI Segment - by El Forum - 06-26-2012, 06:05 AM
Return URI Segment - by El Forum - 06-26-2012, 06:11 AM
Return URI Segment - by El Forum - 06-28-2012, 10:19 PM
Return URI Segment - by El Forum - 06-28-2012, 10:58 PM
Return URI Segment - by El Forum - 06-29-2012, 01:08 AM
Return URI Segment - by El Forum - 06-29-2012, 01:18 AM
Return URI Segment - by El Forum - 06-29-2012, 01:22 AM
Return URI Segment - by El Forum - 06-29-2012, 03:37 AM
Return URI Segment - by El Forum - 06-30-2012, 01:18 AM
Return URI Segment - by El Forum - 07-02-2012, 12:12 AM
Return URI Segment - by El Forum - 07-02-2012, 02:09 AM



Theme © iAndrew 2016 - Forum software by © MyBB