Install Wordpress on the hero, access pages without root pages, configure the server

I made my own installation on heroku wordpress, which installs and runs well. I can configure it, create pages, create messages, but when it comes to routing, I have problems. I can't seem to get the generated pages / posts, and I keep getting 404, whether I use ngnix or apache as the server.

For example, I am deploying PHP 7.1.11 with Apache2, my Proc file:

 web: vendor/bin/heroku-php-apache2 

/ page displays a penalty. But none of the subpages, for example:

xyz.com/2017/10/test/ leads to 404, as shown in the log:

 2017-10-31T19:16:35.829992+00:00 heroku[router]: at=info method=GET path="/2017/10/test/" host=xyv.com request_id=84ff659b-346e-4715-b629-66e13524b64c fwd="xxxx" dyno=web.1 connect=0ms service=1ms status=404 bytes=377 protocol=htt 

Should there be more configuration in Procfile to make this work out of the box? Ideally with better links, e.g. /articlename/

+5
source share
1 answer

Please check your permalink settings, it must be configured so that index.php gets into your url. The reason for this is because on the nginx server index.php is required in the url,

try your url with index.php for ex if your email url is xyz.com/helloworld, then in the post url check with xyz.com/index.php/helloworld.

The problem is that urls are trying to change permalinks and include include index.php

 /index.php/%postname%/ 

use the custom permalink option with the setting above.

+2
source

Source: https://habr.com/ru/post/1273029/


All Articles