Remove controller name from the URL in CodeIgniter

Example URL:

here “controller” is your controller name

“function” is controller function

“parameter” is parameter of pages function.

Now if we remove controller name from url,it should work ,

Open application/config/routes.php file ,and modify the entire code like this

$default_controller = "controller"; // default controller name
$route['default_controller'] = $default_controller;

// here i removed controller name from url
$controller_exceptions = array(“function”); // here function is controller function you can mention as many as controller function that we can exclude controller name from the url

foreach($controller_exceptions as $v) {
$route[$v] = “$default_controller/”.$v;
$route[$v.”/(.*)”] = “$default_controller/”.$v.’/$1′;
now run your project url like :

.htaccess mod_rewrite for CodeIgniter

<IfModule mod_rewrite.c>
  RewriteEngine On
  # !IMPORTANT! Set your RewriteBase here and don't forget trailing and leading
  #  slashes.
  # If your page resides at
  # then use
  # RewriteBase /mypage/test1/
  RewriteBase /
  RewriteCond %{REQUEST_FILENAME} !-f
  RewriteCond %{REQUEST_FILENAME} !-d
  RewriteRule ^(.*)$ index.php?/$1 [L]

<IfModule !mod_rewrite.c>
  # If we don't have mod_rewrite installed, all 404's
  # can be sent to index.php, and everything works as normal.

  ErrorDocument 404 /index.php

Sticky footer using pure css


<div id=“wrapper”>
<p>lots of content</p>
<div id=“stickyFooter”>
<p>Content for sticky footer</p>
.stickyFooter {
position: fixed;
bottom: 0px;
width: 100%;
overflow: visible;
z-index: 99;
padding-top: 5px;
padding-bottom: 3px;
background: white;
border-top: solid white 2px;
background-color: #89D4DF;
-webkit-box-shadow: 0px -5px 15px 0px #bfbfbf;
box-shadow: 0px -5px 15px 0px #bfbfbf;
height: 34px;