Warning: file_get_contents(/data/phpspider/zhask/data//catemap/8/.htaccess/5.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
.htaccess 在htaccess中匹配URL_.htaccess - Fatal编程技术网

.htaccess 在htaccess中匹配URL

.htaccess 在htaccess中匹配URL,.htaccess,.htaccess,我有一个htaccess文件: RewriteEngine On RewriteRule ^([a-zA-Z0-9]+:/.)$ result.php?u=$1 RewriteRule ^([a-zA-Z0-9]+:/.)/$ result.php?u=$1 我想做的是,重写到,但我只得到一个“请求的URL在此服务器上找不到”试试这个: RewriteEngine On RewriteRule ^([a-zA-Z0-9:/\.]+)$ http://example.com/result.php

我有一个htaccess文件:

RewriteEngine On
RewriteRule ^([a-zA-Z0-9]+:/.)$ result.php?u=$1
RewriteRule ^([a-zA-Z0-9]+:/.)/$ result.php?u=$1
我想做的是,重写到,但我只得到一个“请求的URL在此服务器上找不到”

试试这个:

RewriteEngine On
RewriteRule ^([a-zA-Z0-9:/\.]+)$ http://example.com/result.php?u=$1