htaccess的问号让 [英] .htaccess Question mark allowing

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

问题描述

您好今天我试图改写几件事情,我试图改写这样的:

Hello today i tried to rewrite few things, i tried to rewrite this:

www.example.com/index.php?title=how+do+man+live?

要:

www.example.com/posts/how+do+man+live?/

现在的问题是问号只能出现在URL,当我张贴$ _ GET变量(冠军。)它的后一切,但不是问号。

Now the problem is that the question mark appears only at url and when i post the $_GET variable(title..) its post everything but not the question mark.

我试图把在改写MDOE这样的:

i tried put in rewrite mdoe this:

RewriteRule post/([0-9א-בa-zA-Z+.`?]+)/?$ index.php?title=$1 [NC]

当然是重写引擎上。 感谢你们,有美好的一天!

course that the Rewrite engine is on. thank you guys, have wonderful day!

推荐答案

您需要捕获从 THE_REQUEST 变量此值能捕捉也。在根目录的.htaccess使用这条规则:

You need to capture this value from THE_REQUEST variable to be able to capture ? also. Use this rule in root .htaccess:

RewriteEngine On

RewriteCond %{THE_REQUEST} \s/+posts/(\S+) [NC]
RewriteRule ^ index.php?title=%1 [L,QSA]

这篇关于htaccess的问号让的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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