Entries tagged Wordpress

.htaccess per WordPress

Posted on April 16, 2014 Comments

Per usare i permalinks su un blog WordPress, bisogna:

  • Creare un file .htaccess nella cartella in cui √® presente il blog con il seguente contenuto:

<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>
<files wp-config.php>
order allow,deny
deny from all
</files>

Poi bisogna settare i permessi e l’ownership del file creato:


chown -v www-data:www-data /var/www/yourwordpressfolder/.htaccess

chmod -v 664 /var/www/yourwordpressfolder/.htaccess

ed infine da shell:


sudo a2enmode rewrite

sudo service apache2 restart

That’all!