在Wordpress(或.htaccess)中设置URL别名 [英] Make URL alias in Wordpress (or .htaccess)
本文介绍了在Wordpress(或.htaccess)中设置URL别名的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我有一个在Wordpress上运行的网站,我想创建一个自定义的短网址.
I have a site running on Wordpress, and I want to create one custom short-url.
如果页面URL是www.mysite.com/category/post,我希望用户能够访问www.mysite.com/alias
If a page URL is www.mysite.com/category/post I want the user to be able to visit www.mysite.com/alias
如果有一种"Wordpress-y"处理方式,那就更好了,但是我也可以通过修改.htaccess文件来做到这一点.
If there is a 'Wordpress-y' way of doing things, that would be preferable, but I am also able to do it by modifying the .htaccess file.
谢谢
推荐答案
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteRule ^alias$ category/post [R=301,L]
</IfModule>
这篇关于在Wordpress(或.htaccess)中设置URL别名的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文