I am running a backup of my website on Ubuntu 12.10 (apache+mysql). I can see properly admin and home page, but permalinks are not working (so urls like this are failing: localhost/page/…/).
What I did till now is:
1) Created file .htaccess via settings->permalinks with the content:
# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^index.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>
# END WordPress
2) Added rewrite apache module with:
sudo a2enmod rewrite
3) Changed in the file sites-enabled/000-default the row:
AllowOverride None
to:
AllowOverride All
4) Finally restarted apache with:
sudo service apache2 restart
Anyway I am still getting “not found” when I visit a permalink.
How can I make the permalinks work?
Check in a phpinfo() that the mod_rewrite works. Also refresh the permalinks in the backend. Permalinks works fine, also on Ubuntu 12.10.
If you have already run sudo a2enmod rewrite command but your URL Rewrite is not working.
To make .htaccess files work as expected, you need to edit this file:
Step1 :
sudo vi /etc/apache2/sites-available/default
Step2 : Look for a section that looks like this:
You need to modify the line containing AllowOverride None to read AllowOverride All.
step3 : sudo /etc/init.d/apache2 reload