Question

Wordpress posts redirects to home

Posted October 8, 2018 833 views
WordPress Ubuntu 16.04

I have a website with a php application running on a droplet Ubuntu 16. http://addpost.io

In the /blog directory there is a Wordpress installed running quite fine. http://addpost.io/blog

I publish a post on the Wordpress blog, I see on the Wordpress homepage… but when I click ‘Read more’ to see the post entirely, it redirects to the home main website. But the URL is the post URL! https://addpost.io/blog/how-to-get-followers-on-instagram/

Any idea what is happen? Thanks.

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

1 answer

Try this in your .htaccess in the blog/ folder:

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

You might need to comment out the current rewrite rules that you have there so this new code takes effect.

Submit an Answer