If you don't know how to setup your codeigniter project click here
Create .htaccess(including the dot) in your project root folder
Go through below procedure
By default index.php file will be included in your url.
Go through below procedure
By default index.php file will be included in your url.
http://localhost/codeigniter/index.php/first
Sample project code click here
You can easily remove this file by using .htaccess file writing some rewrite rules.
put below code inside your .htaccess file.
<IfModule mod_rewrite.c>
RewriteEngine on
RewriteCond $1 !^(index\.php)
RewriteRule ^(.*)$ /codeigniter/index.php/$1 [L]
</IfModule>
RewriteEngine on
RewriteCond $1 !^(index\.php)
RewriteRule ^(.*)$ /codeigniter/index.php/$1 [L]
</IfModule>
step-1 RewriteCond $1 !^(index\.php|images|css|js|robots\.txt) give permission using Rewrite Rule i.e. js( javascript library ), images etc.

No comments:
Post a Comment