Welcome Guest, Not a member yet? Register   Sign In
[SOLVED] NEWBIE - Problem removing index.php from url
#1

[eluser]lollylegs[/eluser]
Would be grateful if someone could tell me where I'm going wrong as I'm pretty new to this rewrite caper.
Regards Marea
Australia

Both my index.php and .htaccess files are directly below /codeigniter

MY PROBLEM :question:
The requested URL /blog/ was not found on this server.


My path:
v:\www\apache\htdocs\codeigniter

My .htaccess
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteCond %{REQUEST_URI} ^system.*
RewriteRule ^(.*)$ /index.php/$l [NC,L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ /index.php/$l [NC,L]
</IfModule>

<IfModule !mod_rewrite.c>
ErrorDocument 404 /index.php
</IfModule>

My index.php
&lt;?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 = "system";

/*
|---------------------------------------------------------------
| 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://ellislab.com/codeigniter/user-gui..._apps.html
|
|
| NO TRAILING SLASH!
|
*/
$application_folder = "application";

/*
|===============================================================
| 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)Wink;
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...NOT ME!!!!!! 8-/
|
*/
require_once BASEPATH.'codeigniter/codeigniter'.EXT;

/* End of file index.php */
/* Location: ./index.php */

My Relevant httpd.conf section

DocumentRoot "C:/www/apache/htdocs"
#
# Each directory to which Apache has access can be configured with respect
# to which services and features are allowed and/or disabled in that
# directory (and its subdirectories).
#
# First, we configure the "default" to be a very restrictive set of
# features.
#
<Directory />
Options FollowSymLinks
AllowOverride None
Order deny,allow
Deny from all
</Directory>

#
# Note that from this point forward you must specifically allow
# particular features to be enabled - so if something's not working as
# you might expect, make sure that you have specifically enabled it
# below.
#

#
# This should be changed to whatever you set DocumentRoot to.
#
<Directory "C:/www/apache/htdocs">
Options Indexes Includes FollowSymLinks Multiviews
AllowOverride AuthConfig FileInfo
Order deny,allow
Allow from all
</Directory>


Messages In This Thread
[SOLVED] NEWBIE - Problem removing index.php from url - by El Forum - 10-16-2008, 10:27 PM
[SOLVED] NEWBIE - Problem removing index.php from url - by El Forum - 10-17-2008, 01:59 AM
[SOLVED] NEWBIE - Problem removing index.php from url - by El Forum - 11-13-2008, 05:52 PM
[SOLVED] NEWBIE - Problem removing index.php from url - by El Forum - 11-14-2008, 08:59 AM
[SOLVED] NEWBIE - Problem removing index.php from url - by El Forum - 04-12-2009, 04:23 AM



Theme © iAndrew 2016 - Forum software by © MyBB