最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

functions - How Can I Create a Friendly Slug for a Dynamic Page?

programmeradmin5浏览0评论

I built a dynamic page template that pulls biography information from a MySQL table.

The page works fine but the URL is ugly.

Officer-Biography/?ID=1

I have a set of canonical slugs that I want to use for each officer.

for example, Officer-Firstname-Lastname

I've tried both htacess and add_rewrite_rule and both give me 404.

example: add_rewrite_rule('Officer-Erich-Abberger', 'Officer-Biography/?ID=1', 'top');

What am I missing?

发布评论

评论列表(0)

  1. 暂无评论