-
Notifications
You must be signed in to change notification settings - Fork 7.6k
Removing index.php from a URL path in XAMPP for Windows
-
Open command prompt
-
In the command prompt, change the working directory to the CodeIgniter directory i.e. the directory that contains the application and system directories
cd C:\xampp\htdocs\site_folder -
Type
copy con .htaccessto create a .htaccess file in the current working directory -
Press [ENTER] to append an empty line
-
Type the following code:
<IfModule mod_rewrite.c> RewriteEngine On RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule ^(.*)$ index.php/$1 [L] </IfModule> -
Finally, enter CTRL + Z to append the data to the .htaccess file and hit [ENTER] to save
-
Locate the httpd.conf file in the Apache sub-directory
C:\xampp\apache\conf\httpd.conf -
Uncomment the following line from:
#LoadModule rewrite_module modules/mod_rewrite.soto
LoadModule rewrite_module modules/mod_rewrite.so -
Save the changes to the file
-
Locate config.php
C:\xampp\htdocs\site_folder\system\application\config -
Change the following line from:
$config['index_page'] = 'index.php';to
$config['index_page'] = '';