0

I just installed a legacy WordPress 4.7 project on XAMPP 7.2.5 on macOS High Sierra 10.13.4.

I found that I'm able to view the *.php files under /Applications/XAMPP/xamppfiles/htdocs/. e.g. http://127.0.0.1/wp-login.php, and http://127.0.0.1/index.php.

However, all permalinks of the pages cannot be displayed.

enter image description here

When I visit one of the permalinks, I get an Object not found! error.

enter image description here

I've tried the solutions mentioned in this post, but they don't work in my case.

What is necessary to make permalinks to be displayed correctly?

Here's my /var/www/html/.htaccess file:

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


# 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
Brian
  • 12,145
  • 20
  • 90
  • 153
  • 1
    rewrite module is on or not ? – Akshay Shah May 23 '18 at 05:45
  • I just turned `mod_rewrite` on by following the tutorials [here](https://www.digitalocean.com/community/tutorials/how-to-rewrite-urls-with-mod_rewrite-for-apache-on-ubuntu-16-04). But the permalink still has problems. – Brian May 23 '18 at 15:03
  • After doing did you check for same using phpinfo() ? – Akshay Shah May 23 '18 at 15:26
  • I found that `mod_rewrite` is inside Loaded Modules in phpinfo(). Does this mean that rewrite module is turned on? – Brian May 24 '18 at 01:30
  • Just restart your apache ane give the file permission 777 or 655 and check – Akshay Shah May 24 '18 at 02:44
  • @AkshayShah Still not work :-( – Brian May 24 '18 at 02:48
  • Delete your .htacess and just reset the pemalinks from admin. – Akshay Shah May 24 '18 at 03:01
  • @AkshayShah What do you mean by "reset the permalinks"? I don't find any buttons that reset the configuration of permalinks. – Brian May 24 '18 at 06:34
  • I just deleted `.htaccess` file and let wordpress generate it for me. But permalinks still doesn't work. – Brian May 24 '18 at 06:34
  • It seems that the configuration of `/etc/apache2/apache2.conf` prevents `.htaccess` from working. After I change the config from ` Options Indexes FollowSymLinks AllowOverride None Require all granted ` to ` Options Indexes FollowSymLinks AllowOverride All Require all granted `. My problem got solved. – Brian May 24 '18 at 06:47

1 Answers1

0

Frequently there are problems with permalinks settings. You should try to change permalink settings according to documentation