martes, 7 de mayo de 2013

Codeigniter how remove index.php from url

Codeigniter 2.1.3

To remove index.php from url you need to create a .htaccess with this code:
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /codeigniter
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php/$1 [L]
</IfModule>
<IfModule !mod_rewrite.c>
ErrorDocument 404 /codeigniter/index.php
</IfModule>
Modify /codeigniter with your project path.
My project path is /var/www/codeigniter/ so... 
Put it in your project root directory. 
Check if mod_rewrite is enabled. You can create a php file with the next code:
<?php phpinfo(); ?>
and in Loaded Modules section check if is loaded mod_rewrite. Or:
if (in_array('mod_rewrite',apache_get_modules())) {
    echo "mod_rewrite loaded";
} else {
    echo "mod_rewrite not loaded";
}
If mod_rewrite is not loaded
sudo a2enmod rewrite
restart apache
sudo /etc/init.d/apache2 restart
if it doesn't work, you need to enable at least  
AllowOverride FileInfo and Options FollowSymLink 
to your Apache configuration file.
/etc/apache2/sites-available/default

Ok, now you can say good bye to index.php 


sábado, 2 de febrero de 2013

Linux Mint 14 XFCE missing title bar and context menu

I had a rare problem. When Mint started and I executed an app eg Firefox, the app doesn't had the title bar! So, I couldn't min, max or close the window. In the "Taskbar" doesn't display anything and the app stayed static. I don't know what was the problem here, but i can solve it with one line command. Open the terminal and put: xfwm4

that's all folks! 


I found the solution here
All credits for menta3 from http://www.linuxmint-hispano.com