[英]Redirect pagination to base Url in website Wordpress
How can I display the URLs on my site in a cleaner fashion, example:如何以更简洁的方式在我的网站上显示 URL,例如:
Change改变
example.com/item/page-1.html example.com/item/page-1.html
to到
example.com/item/ example.com/item/
If you want to update permalinks to not include index.php then add a .htaccess file to the wordpress folder and add the following content to it:如果您想更新永久链接以不包含 index.php,则将 .htaccess 文件添加到 wordpress 文件夹并添加以下内容:
# 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]
</IfModule>
# END WordPress
Then go to the Wordpress Dashboard > Settings > Permalinks > and change it to "post name" and save changes.然后转到 Wordpress 仪表板 > 设置 > 永久链接 > 并将其更改为“帖子名称”并保存更改。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.