http://xmwusx.cn这个是我用php开发的一个blog想给他增加url重写的功能
但是遇到一个问题哦
对于重写有多种方法
apache的
php的path info
但是比较头痛的
就是页面中的地址要怎么转换
比如一篇文章的地址的<a href="http://xmwusx.cn/article.php?id=111">sss</a>
我要怎么把这个连接转换成<a href="http://xmwusx.cn/article/111">sss</a>
但是遇到一个问题哦
对于重写有多种方法
apache的
php的path info
但是比较头痛的
就是页面中的地址要怎么转换
比如一篇文章的地址的<a href="http://xmwusx.cn/article.php?id=111">sss</a>
我要怎么把这个连接转换成<a href="http://xmwusx.cn/article/111">sss</a>
RewriteBase /
RewriteRule ^(.*)$ article.php?$1 [L,QSA]
自己输出地址的时候按照rewrite后的输出呗