Skip to main content

Posts

Showing posts with the label rewrite

Reduce Page Speed

Enable gzip compression <IfModule mod_deflate.c>     AddOutputFilterByType DEFLATE image/png image/gif image/jpeg image/jpg text/text text/html text/plain text/xml text/css application/x-javascript application/javascript text/javascript application/json </IfModule> AddType font/ttf .ttf AddType font/eot .eot AddType font/otf .otf AddType font/woff .woff AddType font/svg .svg Leverage Browsing Cache <IfModule mod_expires.c>     ExpiresActive On     ExpiresDefault "access plus 10 days"     ExpiresByType image/png "access plus 10 days"     ExpiresByType image/gif "access plus 10 days"     ExpiresByType image/jpeg "access plus 10 days"     ExpiresByType image/jpg "access plus 10 days"     ExpiresByType text/css "access plus 10 days"     ExpiresByType application/javascript "access plus 10 days"     ExpiresByType applicati...

Remove Index.php in CodeIgniter

If you are using  Codeigniter  you are noticed that by default  index.php  will be included with your  URL . But you can easily remove index.php from your CodeIgniter’s URL so that your URL should be like: impegnotech.com/site/contact To do this just follows the following steps: Open  config.php  from  system/application/config  directory and replace $config['index_page'] = “index.php”  by  $config['index_page'] = “” Create a  “.htaccess”  file in the root of CodeIgniter directory (where the system directory resides), open the file using your favorite text editor, write down the following script and save it: RewriteEngine on RewriteCond $1 !^(index\.php|resources|robots\.txt) RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule ^(.*)$ index.php/$1 [L,QSA] In some case the default setting for  uri_protocol  does not work properly. To solve this problem just replace ...