php mod重写 [英] php mod rewrite
本文介绍了php mod重写的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我对使用php进行mod_rewrite有一个疑问.
i got a Q regarding mod_rewrite with php.
目前,我的userprofile php页面具有以下链接来确定用户: domain.com?username=john
currently my userprofile php page has the following link to determine a user: domain.com?username=john
我需要将此网址转换为如下形式: domain.com/john.
i would need to convert this url into like this: domain.com/john.
我该如何在mod_rewrite中做到这一点?
how can i do this in mod_rewrite??
推荐答案
类似的东西:
RewriteEngine On
RewriteRule ^domain.com/(.*)$ domain.com/profile.php?username=$1
这篇关于php mod重写的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文