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 假图像url htaccess-添加搜索引擎优化文本_.htaccess - Fatal编程技术网

.htaccess 假图像url htaccess-添加搜索引擎优化文本

.htaccess 假图像url htaccess-添加搜索引擎优化文本,.htaccess,.htaccess,我的图片真实的网址是 但我想把图像url显示为 我尝试了很多组合,但都不起作用。因为我需要url的最后1部分,用(-) 感谢您的帮助您可以使用: RewriteEngine on RewriteRule ^(images/\d+/)[^/]+-(.+\.jpg)$ $1$2 [NC,L] 你能告诉我们你试过什么吗?重写规则^images/([^/]+)/([^/]+)\.jpg$/images/$1/$2[L,QSA,NC],我也读了这个问题。但我无法编写代码,因为我的伪路径长度未知。仍然

我的图片真实的网址是

但我想把图像url显示为

我尝试了很多组合,但都不起作用。因为我需要url的最后1部分,用(-)
感谢您的帮助

您可以使用:

RewriteEngine on
RewriteRule ^(images/\d+/)[^/]+-(.+\.jpg)$ $1$2 [NC,L]

你能告诉我们你试过什么吗?重写规则^images/([^/]+)/([^/]+)\.jpg$/images/$1/$2[L,QSA,NC],我也读了这个问题。但我无法编写代码,因为我的伪路径长度未知。仍然无法工作。还尝试重写规则^(images/\d++/)[^/]+-(.+\.jpg)$images/$1/$2[NC,L]