vimal Posted July 16, 2009 Share Posted July 16, 2009 hello everyone i am having a problem with urls i have site which is on free host i installed the script called rbs here is the link http://www.vimal126.0fees.net/rbs/ it works fine here! But i want that my site should go to admin panel by this link http://www.vimal126.0fees.net/rbs/siteadmin but its not working... to access the admin panel i have to type the url http://www.vimal126.0fees.net/rbs/index.php/siteadmin I dont know whats going on please help Link to comment https://forums.phpfreaks.com/topic/166157-url-help/ Share on other sites More sharing options...
Ken2k7 Posted July 16, 2009 Share Posted July 16, 2009 Well I don't know how the MVC works there but you can use mod_rewrite to get your desired effect. Link to comment https://forums.phpfreaks.com/topic/166157-url-help/#findComment-876248 Share on other sites More sharing options...
vimal Posted July 16, 2009 Author Share Posted July 16, 2009 i have this index file does i have to do some changes here to get my desired result. <?php /* |--------------------------------------------------------------- | PHP ERROR REPORTING LEVEL |--------------------------------------------------------------- | | By default CI runs with error reporting set to ALL. For security | reasons you are encouraged to change this when your site goes live. | For more info visit: http://www.php.net/error_reporting | */ error_reporting(E_ALL); /* |--------------------------------------------------------------- | SYSTEM FOLDER NAME |--------------------------------------------------------------- | | This variable must contain the name of your "system" folder. | Include the path if the folder is not in the same directory | as this file. | | NO TRAILING SLASH! | */ $system_folder = "core"; /* |--------------------------------------------------------------- | APPLICATION FOLDER NAME |--------------------------------------------------------------- | | If you want this front controller to use a different "application" | folder then the default one you can set its name here. The folder | can also be renamed or relocated anywhere on your server. | For more info please see the user guide: | http://codeigniter.com/user_guide/general/managing_apps.html | | | NO TRAILING SLASH! | */ $application_folder = "app"; /* |=============================================================== | END OF USER CONFIGURABLE SETTINGS |=============================================================== */ /* |--------------------------------------------------------------- | SET THE SERVER PATH |--------------------------------------------------------------- | | Let's attempt to determine the full-server path to the "system" | folder in order to reduce the possibility of path problems. | Note: We only attempt this if the user hasn't specified a | full server path. | */ if (strpos($system_folder, '/') === FALSE) { if (function_exists('realpath') AND @realpath(dirname(__FILE__)) !== FALSE) { $system_folder = realpath(dirname(__FILE__)).'/'.$system_folder; } } else { // Swap directory separators to Unix style for consistency $system_folder = str_replace("\\", "/", $system_folder); } /* |--------------------------------------------------------------- | DEFINE APPLICATION CONSTANTS |--------------------------------------------------------------- | | EXT - The file extension. Typically ".php" | FCPATH - The full server path to THIS file | SELF - The name of THIS file (typically "index.php") | BASEPATH - The full server path to the "system" folder | APPPATH - The full server path to the "application" folder | */ define('EXT', '.'.pathinfo(__FILE__, PATHINFO_EXTENSION)); define('FCPATH', __FILE__); define('SELF', pathinfo(__FILE__, PATHINFO_BASENAME)); define('BASEPATH', $system_folder.'/'); if (is_dir($application_folder)) { define('APPPATH', $application_folder.'/'); } else { if ($application_folder == '') { $application_folder = 'application'; } define('APPPATH', BASEPATH.$application_folder.'/'); } /* |--------------------------------------------------------------- | LOAD THE FRONT CONTROLLER |--------------------------------------------------------------- | | And away we go... | */ require_once BASEPATH.'codeigniter/CodeIgniter'.EXT; /* End of file index.php */ /* Location: ./index.php */ Link to comment https://forums.phpfreaks.com/topic/166157-url-help/#findComment-876734 Share on other sites More sharing options...
vimal Posted July 17, 2009 Author Share Posted July 17, 2009 i have found the way!! its like To do this just follows the following steps: 1. Open config.php from system/application/config directory and replace $config['index_page'] = “index.php” by $config['index_page'] = “” 2. Create a “.htaccess” file in the root of CodeIgniter directory (where the system directory resides), open the file using your favorite text editor, write down the following script and save it: RewriteEngine on RewriteCond $1 !^(index\.php|resources|robots\.txt) RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule ^(.*)$ index.php/$1 [L,QSA] 3. In some case the default setting for uri_protocol does not work properly. To solve this problem just replace $config['uri_protocol'] = “AUTO” by $config['uri_protocol'] = “REQUEST_URI” from system/application/config/config.php Link to comment https://forums.phpfreaks.com/topic/166157-url-help/#findComment-877370 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.