Wordpress permalink 'not found on this server'

I just moved the Wordpress site to a new host. But when I go to any page except the HOME page, I got this error:

Not Found

The requested URL /about was not found on this server.

Apache/2.2.16 (Debian) Server at 176.xx.yy.zz Port 80

I changed the Permalink parameter to Default, which makes the URL look like mysite.com/?page_id=5, and the page displays in order. Therefore, the problem is not in my code.

My first guess is mod_rewritenot included. But phpinfo()tells me that it mod_rewriteloads correctly.

My .htaccess is created automatically and looks like this:

# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /beta-test/
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /beta-test/index.php [L]
</IfModule>
# END WordPress

Any solution?

thanks

+4
source share
5 answers

You need to edit the Apache file http.confand

change #LoadModule rewrite_module modules/mod_rewrite.so

to LoadModule rewrite_module modules/mod_rewrite.so

Apache2, http.conf (.. ubuntu), a2enmod .

+7

, - .

  • AccessFileName.htaccess apache.
  • AllowOverride ALL apache wordpress.
+2

, .htaccess , , Apache . Ubuntu :

sudo a2enmod rewrite
sudo apache2ctl restart
+1

,

.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

.

0

, :

shell > a2enmod rewrite enable

apache2.

0

All Articles