Wordpress with friendly URL - Apache error - How to resolve?

Asked

Viewed 1,714 times

2

I’m having problems with Wordpress with friendly URL. It just doesn’t work even using the file . htaccess suggested by Wordpress support site.

cat .htaccess 

# 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

I believe the error is in the configuration of Apache. Any idea how to fix this ?

  • You are using a local server (such as wamp, xampp, etc.) or an online server?

  • local server on MAC OS but I think it’s the same on Linux.

  • I found a post that explains well and in detail but in my case all that was missing was AllowOverride All.

1 answer

5

Check in your file /etc/apache2/httpd.conf the following conditions:

  1. The line below should be uncommented

    LoadModule rewrite_module libexec/apache2/mod_rewrite.so

  2. The lines that define whether . htaccess can be overwritten by local settings of specific contents are usually defined as AllowOverride None you must change to:

    AllowOverride All

  3. Make sure that RewriteEngine appear in the file as below:

    RewriteEngine on

  4. keep in the Site Root directory your site configuration .htaccess correctly described in your question.

That’s all.

Browser other questions tagged

You are not signed in. Login or sign up in order to post.