How do I remove the \"index.php\"
sticking out in every path in codeigniter somewhere in the center?
I want clean non index.php-fied URLs
?
RewriteEngine on
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule .* /codeigniter/index.php/$0 [PT,L]
after changing RewriteRule .* index.php/$0 [PT,L] with the project folder name "codeigniter".its working for me. Thanks guys for your support.
Step 1 => Place your .htaccess file in root folder where application and system folders exist.
Step 2 => If your web path using sub-folder like - yourdomain.com/project/ - then use following code in htaccess file
RewriteEngine on
RewriteBase /project/
RewriteCond $1 !^(index\.php|images|robots\.txt)
RewriteRule ^(.*)$ /project/index.php/$1 [L]
If your web path using root-folder like - yourdomain.com - then use following code in htaccess file
RewriteEngine on
RewriteBase /
RewriteCond $1 !^(index\.php|images|robots\.txt)
RewriteRule ^(.*)$ /index.php/$1 [L]
Hi This one worked me
RewriteEngine on
RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ /folder/index.php?/$1 [L]
as well as this
RewriteEngine on
RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ /folder/index.php?/$1 [L]
where the folder is the name of the subfolder if this codeigniter application is hosted as a subdomain e.g domainname/folder/index.php.
Hope that works for you. Thanks.