Whenever I change my permalink option from the default to /%postname%/, it results into my page cannot be found.
WordPress would complain that it cannot modify the .htaccess (because there was none), so I created it in /var/www/. The .htaccess has the same owner / permissions as my wordpress folder.
Please help, I’ve been trying to fix this for 3 days now.
Do I also need to change the mod_rewrite somewhere?
EDIT:
Solved!
inside /var/www/.htaccess
Add the line: Options +FollowSymLinks
for the mod_rewrite problem:
Check for Apache Mod_ReWrite â Following lists all the loaded modules
sudo apache2ctl -M Enable Mod_Rewrite
sudo ln -s /etc/apache2/mods-available/rewrite.load
/etc/apache2/mods-enabled/rewrite.load Restart Apache view
sourceprint? 1 sudo /etc/init.d/apache2 restart
courtesy of https://usingnix.wordpress.com/2010/12/21/apache-mod_rewrite-wp-permalinks/
I think there is enough information to make an answer. Really, only barely a WordPress questions but here you go.
First, be aware that the query-string format–
?p=
,?s=
, etc– should always work.This is for an Apache(2) server.
mod_rewrite
must be enabledAllowOverride All
or at leastAllowOverride File
must be set.htaccess
file must be properly created. WordPress will write the file if it can, otherwise go to the wp-admin->Settings->Permalinks, and save the permalinks. If WordPress complains that it can’t write the.htaccess
file then copy what WordPress tells you into.htaccess
manually. This is a required part of the process.Solved!
inside /var/www/.htaccess
Add the line: Options +FollowSymLinks
for the mod_rewrite problem:
courtesy of https://usingnix.wordpress.com/2010/12/21/apache-mod_rewrite-wp-permalinks/