开发者

Wordpress, two URLs for the same post

开发者 https://www.devze.com 2022-12-17 17:59 出处:网络
Is it possible to have two URL for a same post in wordpress.com? One would be a short URL like http://mydomain.com/28

Is it possible to have two URL for a same post in wordpress.com?

One would be a short URL like

http://mydomain.com/28

and the other will be a SEO friendly one:

http://mydomain开发者_Python百科.com/28-this-is-the-post-about...

thanks


In wordpress, all posts are at the URL mywordpresshome.com/?p=xx where xx is the post ID number. Anything else involves mod_rewrite. WordPress will do one type of rewrite for you in the Admin section -- so you can pick either the short version or the long one above. In the Admin interface, it won't let you do both. But you could edit mod_rewrite yourself and effectively get both patterns -- short and long -- to work.

Here's info on mod_rewrite: http://www.workingwith.me.uk/articles/scripting/mod_rewrite


In the Settings->Permalinks part of the admin panel, you can set the look of your permalinks, but that doesn't mean the default dynamic links (yourblog.com/?p=5 or whatever) will stop working. You can use those links too and they will take you to the corresponding page. However, Wordpress will automatically substitute the dynamic link by its SEO-friendly alias.

I'm not sure whether it's possible to have two different aliases for the same post though.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号