Browsed by
Category: Tips

Apache2 mod_rewrite and %{REQUEST_FILENAME}

Apache2 mod_rewrite and %{REQUEST_FILENAME}

I’m trying to develop a new website to increase my php object oriented skills. For this new website, I want every request for any url that doesn’t match a actual file on the disk to be redirected to index.php (to handle parameters in fact). Easy with apache2 rewrite rules : [cc lang=”apache”] RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteCond %{REQUEST_FILENAME} !-l RewriteRule ^/(.*)$ /index.php?rt=$1 [L,QSA] [/cc] This means : if the requested file is not a real file, and isn’t…

Read More Read More

Time

Time

Today I struggled with the time command. I wanted to use it in a bash script, so I checked the man page, where I found interesting stuff : [cc lang=”bash”]$ man time time – run programs and summarize system resource usage SYNOPSIS time [ -apqvV ] [ -f FORMAT ] [ -o FILE ] [ –append ] [ –verbose ] [ –quiet ] [ –portability ] [ –format=FORMAT ] [ –output=FILE ] [ –version ] [ –help ] COMMAND […

Read More Read More

phpmyadmin & pagination

phpmyadmin & pagination

You’re crazy and you created more than 250 tables in your mysql server, and now you’re bored with this ugly and unergonomic pagination on phpmyadmin? I found the solution, and an easy one : just add this line at the bottom of your config.inc.php file : [cc lang=”php”]$cfg[‘MaxTableList’] = 500;[/cc] And that’s it ! now you can display your 500 tables at once ! However be careful, the more tables you display, the more time it will take each time,…

Read More Read More

felis elit. odio Lorem commodo ut fringilla