您好,欢迎访问一九零五行业门户网

php的url重写mod_rewrite,该怎么解决

php的url重写。mod_rewrite
loadmodule rewrite_module modules/mod_rewrite.so  打开这个就是url的重写,但是我在实际应用中应该怎么使用呢,能不能举一个简单的例子。thinkphp引入了一个文件是 .htaccess
options +followsymlinks
  rewriteengine on
  rewritecond %{request_filename} !-d
  rewritecond %{request_filename} !-f
  rewriterule ^(.*)$ index.php/$1 [qsa,pt,l]
希望可以给我一个简单的例子,谢谢了!
------解决思路----------------------
.htaccess里面
rewriteengine on
rewritebase /
options -indexes
rewriterule ^product/([1-9]\d*).html($) product.php?id=$1
打开product/111.html就进入对应的product.php页页,接收参数id
------解决思路----------------------
#rewriterule ([^/]*)_([^/]*).html$  include/action1.php?into=$1&oprtype=$2 [nc]
按着这个方法写就对了,前面是文件,后面是具体的url
------解决思路----------------------
http://www.verydz.com/help/thread-674-1-1.html
其它类似信息

推荐信息