简体   繁体   中英

How to add wordpress slug manually in php file?

When i search for a specific page on the web for my website it shows the index file on all the searches eg www.website.com/ whereas it should show www.website.com/pageone.php

On wordpress this is called a slug, how can i replicated this similar to how you do the description in meta tags?

I suggest looking into mod_rewrite , which allows you to map arbitrary URLs to your internal PHP URL structure (eg example.com/about to index.php?page=about ).

It's the same technique as used by wordpress.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM