将URL ID更改为简单文本


Change URL ID into simple text

我正试图改变这一点。

例如,在提交URL时http://www.fxstoc.com/detailed_news.php?newsid=25我想回来http://www.fxstoc.com/serbia-holds-main-rate-as-vucic-Prepares-to-Form-new-government

我喜欢将newsid=25替换为简单文本php是如何做到这一点的?

您需要mod_rewrite。它是一个Apache函数,例如将detailed_news.php?newsid=25转换为serbia-holds-main-rate-as-vucic-Prepares-to-Form-new-government

看看这里的一些例子:

http://www.sitepoint.com/apache-mod_rewrite-examples/