.htaccess mod_rewrite 思维区块
我在使用 ModRewrite 时遇到了关于如何适当隐藏查询字符串参数的问题。基本上是这样的..
from:
http://localhost/index.php?page=news&=request=somepage&id=100&sort=asc
to:
http://localhost/news/somepage/id/asc
我尝试用它做不同的变化,但没有成功。现在,我只能从 url 中显示查询参数,这是我试图避免的。
I've been having trouble with the ModRewrite on how to appropriately hide query string parameters. Basically something like this..
from:
http://localhost/index.php?page=news&=request=somepage&id=100&sort=asc
to:
http://localhost/news/somepage/id/asc
I've attempted to do different variations with it but to no success. For now I make do with revealing query paramaters from the url which is what I'm trying to avoid.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
类似的内容
在
.htaccess
文件中写入:也是为了更好地使用图像、样式表、脚本等。我建议添加
位于网站所有页面的标记中。
Something like this
in
.htaccess
file write:Also for better using with images, stylesheets, scripts etc. I recommend to add
<base href="index.php">
in<head>
tag at all pages in your site.