Home  >  Article  >  Backend Development  >  斑竹求教一个阿帕奇rewrite有关问题

斑竹求教一个阿帕奇rewrite有关问题

WBOY
WBOYOriginal
2016-06-13 11:52:52986browse

斑竹求教一个阿帕奇rewrite问题
怎么样写使得访问localhost:8080/sell/info.asp?id=1跳转到http://localhost:8080/jd37/html/gyjbj/1.html



好像就是一个问号的问题

参考网上的资料,我这样写的


RewriteEngine on   

RewriteCond %{QUERY_STRING} ^id=(.*)$
RewriteRule ^/sell/info.asp$ /jd37/html/gyjbj/$1.html [L]


那是貌似跳转不鸟呢。求赐教
------解决方案--------------------

引用:
Quote: 引用:

Quote: 引用:

asp 在apache运行?



那个asp是之前的网站,现在我改成php的了,想保证以前的百度收录,所以要做rewrite,把以前的asp的也没跳到现在的php静态页面来,就是这个意思。

自然已经改成了php,那么这里你要清楚几点:
1、同一文章内容在多个网址上出现就会造成权重的降低,所以你之前的asp收录是迟早要清除掉的
2、你要做的是尽量保持网站的权重并且转移权重,这个要做,是要用301来做,并且做好404页,删除掉asp文件


支持,做 404是最好的方法。。
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