Warning: file_get_contents(/data/phpspider/zhask/data//catemap/4/regex/16.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,我想通过htaccess重定向到这是否可行是的,这是可能的 将以下内容添加到您的htaccess中 RewriteEngine on RewriteCond %{HTTP_HOST} ^((?!www\.).+)\.example.com RewriteRule !index\.php http://%{HTTP_HOST}/user/index.php?name=%1 [L,R,NE] 上述规则将重定向到foo.example.com到foo.example.com/user/inde

我想通过htaccess重定向到这是否可行是的,这是可能的

将以下内容添加到您的htaccess中

RewriteEngine on



RewriteCond %{HTTP_HOST} ^((?!www\.).+)\.example.com
RewriteRule !index\.php http://%{HTTP_HOST}/user/index.php?name=%1 [L,R,NE]

上述规则将重定向到foo.example.comfoo.example.com/user/index.php?name=foo

是。可以通过htaccess访问。可能的副本