How to Remove index.php from URL in CodeIgniter


Hello Friends ajj me apko btaunga ki Codeigniter me index.php file kese remove kare-

By default hmare file


http://example.com/index.php/tutorials/

is parkar se show hoti hai jab b aap kisi be codeignter web site ya project ko access karte ho to.

But ham ise or seo friendly and short bana sakte hai . yanha se index.php file ko remove karke.

Index.php file remove karne ke bad hmara website url is parkar hoga.




http://example.com/tutorials/




How To remove Index.php File-

Iske liye apko root folder me .htaccess file open karne hai or wanha diye gye code ko remove karke wanha niche diye gye code ko paste kar dena hai.


RewriteEngine On

RewriteCond %{REQUEST_FILENAME} !-f

RewriteCond %{REQUEST_FILENAME} !-d

RewriteRule ^(.*)$ index.php/$1 [L]




Aur .htaccess file ko save kar de.

Ab aap



http://example.com/tutorials/



enter karke apne website or project ko access kar sakte ho easily.

Agar apko koi problem a rhe hai to aap comment me puch sakte ho.

Thank You
Gajabwap Web In Hindi
Previous
Next Post »
Thanks for your comment