Home  >  Article  >  Backend Development  >  没问号参数的地址是什么技术

没问号参数的地址是什么技术

WBOY
WBOYOriginal
2016-06-13 12:53:33779browse

没有问号参数的地址是什么技术?
http://www.ituring.com.cn/article/17490

像这样的地址,很多网站都见过.但17490这个也应该是个动态参数吧.

php 怎么做到呢?


------解决方案--------------------
apache url rewrite技术,有很多种方法,可以生成一个类似于这样的.htaccess文件。

<IfModule mod_rewrite.c><br />
RewriteEngine On<br />
RewriteBase /<br />
<span style="color: #FF0000;">RewriteRule ^article/(\d+)?$ http://www.ituring.com.cn/article.php?ID=$1</span><br />
RewriteCond %{REQUEST_FILENAME} !-f<br />
RewriteCond %{REQUEST_FILENAME} !-d<br />
RewriteRule . /index.php [L]<br />
</IfModule>

------解决方案--------------------
去看看 Apache rewrite 的相关知识。
------解决方案--------------------
伪静态技术 网上很多
Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn