Problem URLs Wordpress Htaccess

1

I have a project that has an institutional site (main domain example: client.com.br) and a blog with Worpdress in subdomain (example: blog.cliente.com.br).

I have an htaccess in the root directory (institutional site) controlling my friendly URLs and an htaccess in the / blog directory (my subdomain).

The Htaccess of my Wordpress is this:

# BEGIN WordPress
RewriteEngine On
RewriteBase /
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
# END WordPress

Everything was working right. It turned out that I had to change the structure, and my blog.cliente.com.br subdomain became a common client.com.br/blog directory for limitations in hosting.

What happens is that:

  • When I access client.com / blog I view the blog right away.
  • If I navigate to client.com.br/blog/wp-admin I can access the administrator.
  • Why, when I access a post like client.com/blog/2017/11/27/a-porcelain-history-is-beauty/ does not work and loads the contents of the index of my domain.com.com.

Do I have to rewrite something in my htaccess directory / blog? Or in my main directory htaccess? I do not understand much about htaccess modifications and have always used only the basics for my friendly URLs.

    
asked by anonymous 01.12.2017 / 12:53

1 answer

2

Solved!

I went to the > Settings > Permanent Links and updated its structure to recreate a new .htaccess file.

Automatically correcting and referencing the directory.

Stayed:

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