RewriteEngine On RewriteCond %{HTTP_HOST} !^www.hellofacteur.com$ RewriteRule ^(.*) https://www.hellofacteur.com/$1 [QSA,L,R=301] RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteCond %{REQUEST_FILENAME} !-l RewriteRule (.*)$ index.php?p=$1 [L,QSA] ErrorDocument 404 /404.html