[英]How to make short url in wordpress with custom taxonomy and custom post type?
I had a struct like this:我有一个这样的结构:
http://example.com/products-category/products/vietnamese-hair/single-drawn-hair/ http://example.com/products-category/products/vietnamese-hair/single-drawn-hair/
How can I make this URL shorter, like: http://example.com/vietnamese-hair/single-drawn-hair ?如何缩短此 URL,例如: http://example.com/vietnamese-hair/single-drawn-hair ?
EDIT: Here is my .htaccess file:
编辑:这是我的 .htaccess 文件:
# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^index\.php$ - [L]
RewriteRule ^unsubscribe/$ /wp-content/plugins/email-newsletter/unsubscribe/unsubscribe.php [QSA,L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>
# END WordPress
# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^index\.php$ - [L]
RewriteRule ^unsubscribe/$ /wp-content/plugins/email-newsletter/unsubscribe/unsubscribe.php [QSA,L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>
# END WordPress
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.