HTACCESS Remove Slug Not Working

I have custom post type on my wordpress site. And it has slug “dizi”
so url’s are like that now
site.com/dizi/mypost
i want to remove dizi slug so they will be
site.com/mypost
I tried lots of wordpress function and none of them work and then i try htaccess but it is not working also.
Here is my htacess file

Options +FollowSymLinks -MultiViews
# 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]
RewriteRule ^dizi/(.*)$ /$1 [L,NC,R]
</IfModule>

# END WordPress

With this code i can’t see any effect.I m sure there is url conflict because i just installed wordpress and i have only 1 post.

Related posts

1 comment

  1. Change the order of the lines. /index should be the last, the special patterns should be caught before:

    RewriteRule ^dizi/(.*)$ /$1 [L,NC,R]
    
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule . /index.php [L]
    

Comments are closed.