推进URL重写 [英] advance url rewriting
本文介绍了推进URL重写的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我怎样才能改变
http://www.mydomain.com/down.php?key=1223
到
http://www.mydomain.com/?k=1223
我有谷歌,但没有发现任何ANS ......请帮我...
i have google it but not found any ans...please help me...
我使用的Apache服务器和UNIX
i am using apache server with unix
推荐答案
您应该使用mod_rewrite。添加到您的.htaccess文件的那些行:
You should use mod_rewrite. Add to your .htaccess file those lines:
RewriteEngine On
RewriteBase /
RewriteRule ^\s+\.php\?key=(\d+) \?k=$1
阅读有关的mod_rewrite和规则集在这里: http://httpd.apache.org/docs/1.3/mod/mod_rewrite html的#重写规则
Read about mod_rewrite and RewriteRules here: http://httpd.apache.org/docs/1.3/mod/mod_rewrite.html#RewriteRule
这篇关于推进URL重写的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文