简体   繁体   中英

How to make static Dynamic pages?

In MyBB forums you must have seen that all those threads are stoed as forum.com/Thread-Name-of-the-thread So now this is static right ?

So now i have a site which has

blog.com/search.php?=SEARCHED+TEXT

So now how do i save this search so that Google can find out this page on my site ?

Indirectly what i mean to say is how i can i make

blog.com/SEARCHED+TEXT.html

"So now this is static right?" No. Just because the URL doesn't end in .php or similar doesn't mean it's static. It's time for you to learn the wonders of mod_rewrite:

http://www.workingwith.me.uk/articles/scripting/mod_rewrite

Your first example isn't static at all. It's just using a tool to route the request based on the URL.

All you need to get the same functionality is to investigate URL Routing in PHP and implement it in your application as well.

If you want Google to index this search page you have to tell Google it exists, either through a Sitemap or by putting a link on your site that Google can crawl. Google did fill in forms in the past, but I am not sure if they still do and afaik, they only did on a selected few sites.

To make the search static, you have to render the page once and store it in a file. Whether you do that manually by simply calling up the file in your browser and then saving it or by means of a Caching System is up to you.

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