How to hide the word "blog" from my wordpress site

Asked

Viewed 38 times

1

Whenever I publish a post appears https://www.site.com.br/blog/assunto/, would like to change the URL to https://www.site.com.br/assunto/

Follow my htaccess

<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>

1 answer

2

Simpler than editing the htaccess manually, it is possible to do this configuration directly in the WP admin panel. Go to Configurações > Links permanentes. There select the Post Name option, ex:

inserir a descrição da imagem aqui

This option will result in something similar to this:

<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>
  • Hamurabi, then https://www.site.com.br/blog I can’t change this structure in wordpress. I wonder if by. htaccess with you Search /blog or mask. Grateful.

  • Try to use the code of the .htaccess that I put up. A manual editing of the file also works, except that if by any chance someone, in the administrative panel of wp, makes a change in the configuration of the permanent links, the .htaccess will be overwritten and configs will be lost.

Browser other questions tagged

You are not signed in. Login or sign up in order to post.