htaccess 重写查询字符串 [英] htaccess rewrite for query string

查看:29
本文介绍了htaccess 重写查询字符串的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

好的,我对此很陌生,非常感谢您的帮助,谢谢!

Ok, im pretty new at this and I would really appreciate some help, thanks!

如何在 .htaccess 中正确地重写它?

How can i rewrite this in .htaccess correctly?

所以我的网址中有一个查询字符串:

So I have a query string in my url:

 /?url=contact

我想要做的就是删除查询字符串

All i want to do is remove the query string

 /contact

帮助?我搜索了谷歌,我现在正在学习语法,但事实仍然存在..我还不知道该怎么做.感谢大家

Help? I scoured google and I'm learning the syntax right now, but the fact remains..I dont know how to do it just yet. Thanks to all

推荐答案

这是我的解决方案:

RewriteRule ^(.*)$ index.php?url=$1 [L,QSA]

这篇关于htaccess 重写查询字符串的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆