Warning: file_get_contents(/data/phpspider/zhask/data//catemap/4/regex/17.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Regex .htaccess文件中使用正则表达式的特殊字符。_Regex_.htaccess - Fatal编程技术网

Regex .htaccess文件中使用正则表达式的特殊字符。

Regex .htaccess文件中使用正则表达式的特殊字符。,regex,.htaccess,Regex,.htaccess,我有这个模式来匹配?q=user,但是我写的每一条规则。htaccess不会捕获?,我假设它会将其视为特殊字符。如何指定使用正则表达式将?视为.htaccess文件中字符串的一部分。在?之前尝试使用转义字符\,类似于\?模式在哪里?这是我迄今为止尝试的重写规则(^ |/)?q=user(/|$)-[F]

我有这个模式来匹配
?q=user
,但是我写的每一条规则。htaccess不会捕获
,我假设它会将其视为特殊字符。如何指定使用正则表达式将
视为
.htaccess
文件中字符串的一部分。

之前尝试使用转义字符
\
,类似于
\?

模式在哪里?这是我迄今为止尝试的重写规则(^ |/)?q=user(/|$)-[F]