background preloader

Server

Facebook Twitter

.htaccess snippets to optimize your website. All of the snippets below have to be pasted into your .htaccess file, which is located on the root of your Apache server.

.htaccess snippets to optimize your website

Waring: Always make sure you have a working backup before editing your .htaccess file! Force trailing slash Many clients of mine asked me for always having a trailing slash at the end of their urls. Looks like it’s great for SEO. The following snippet will alwyas add a trailing slash to your site urls. <IfModule mod_rewrite.c> RewriteCond %{REQUEST_URI} /+[^\.]+$ RewriteRule ^(.+[^/])$ %{REQUEST_URI}/ [R=301,L] </IfModule> Source: Prevent hotlinking Hotlinking (the act of using images from another site than yours) is unfortunely a common practice which can waste lots of your precious bandwidth.

Source: Redirect mobile devices If your site is not using responsive web design yet, it could be very useful to be able to redirect mobile device to a mobile-specific version of your website. RewriteEngine On RewriteCond %{REQUEST_URI} ! Source: Force download of a specific filetype. Transfer Wordpress Site From Local Computer to Server Without Reinstalling. Recently, I had to develop a website with a famous CMS – WordPress.

Transfer Wordpress Site From Local Computer to Server Without Reinstalling

I have version 3.2.1. I’m so happy with it, the last time I worked with WordPress was about 3 years ago, and I didn’t appreciate it the way I appreciate it today. So here’s what I went through, I have WAMP on my computer and so I downloaded WordPress, installed it locally and tried to play around with it. I downloaded free WordPress themes, modified them, saved articles, etc.

Security

Partage de source. SQL. Wordpress. Linux. Apache. Service web. Git pour les nuls. Voici un tutoriel Git détaillé pour ceux qui en connaissent très peu sur les systèmes de versions.

Git pour les nuls

Vous comprendrez l’utilité de tels systèmes et surtout comment on se sert des systèmes de versions modernes, le tout en restant le plus pragmatique possible. Voici la liste des commandes nécessaires et suffisantes pour utiliser Git. Il y en a très peu. Il est normal de ne pas les comprendre tout de suite mais c’est pour vous donner une idée. Malgré la longueur de l’article, 95% de l’utilisation de Git tiens dans les 7 commandes décrites ci-après. Récupérer un projet : git clone Utiliser Git tous les jours : git pull git log hack, hack, hack... git status git diff git add new/file git commit -a -m "Fix bug #321" git push Cet article est écrit pour ceux qui en savent très peu sur les systèmes de version.

Si tout ce qui vous intéresse c’est d’utiliser Git tout de suite. Git est un DCVS, c’est-à-dire un système de versions concurrentes décentralisé. Système de versions.