php - Wordpress Permalinks does not work -
i have migrated wordpress website new server (ubuntu) working fine.
but permalinks settings not working. other pages returning me 404 error.
i enabled mod_rewrite
when use custom structure , type /%postname% shows permalink structure updated. , while visiting page returns 404 error.
i using /var/www/html/wordpress installation directory/ folder , have change /etc/apache2/sites-available/000-defaul-config
documentroot /var/www/html/wordpress installation directory
and below in .htaccess file
# 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
any idea wrong?
try https://codex.wordpress.org/using_permalinks#fixing_other_issues
allowoverride not enabled server may not have allowoverride directive enabled. if allowoverride directive set none in apache httpd.config file, .htaccess files ignored. in case, server not attempt read .htaccess files in filesystem. when directive set all, directive has .htaccess context allowed in .htaccess files. example of enabled allowoverride directive in httpd.config:
<directory /> options followsymlinks allowoverride </directory>
you may have enable allowoverride directive in documentroot:
<directory /var/www/html> # ... other directives... allowoverride </directory> may have change allowoverride settings site. surely case when using mac os x server, might likewise other systems. can find site configuration files in /etc/httpd/sites/ if don't want set allowoverride (as above) allowoverride list must include fileinfo directive. must restart apache server httpd.config file changes take effect. more information on overrides allowed, read apache core features.
Comments
Post a Comment