Warning: file_get_contents(/data/phpspider/zhask/data//catemap/8/.htaccess/6.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_Mod Rewrite_Url Rewriting - Fatal编程技术网

.htaccess 使用#参数重写URL

.htaccess 使用#参数重写URL,.htaccess,mod-rewrite,url-rewriting,.htaccess,Mod Rewrite,Url Rewriting,要执行重写规则吗 原始链接:http://www.example.com/centre/#/industry=7 重写链接:http://www.example.com/centre/any-words-here_7.html 尝试了类似贝娄的东西,但没有奏效 RewriteRule ^/centre/(.*)_([0-9]+)\.html$ http://www.example.com/centre/#/industry=$2 [L] 谢谢如果我理解正确,您希望将“#/industry”与一

要执行重写规则吗

原始链接:
http://www.example.com/centre/#/industry=7

重写链接:
http://www.example.com/centre/any-words-here_7.html

尝试了类似贝娄的东西,但没有奏效

RewriteRule ^/centre/(.*)_([0-9]+)\.html$ http://www.example.com/centre/#/industry=$2 [L]

谢谢

如果我理解正确,您希望将“#/industry”与一些工作放在一起,并将“#(行业价值).html”添加到结果中,不是吗?我希望用其他动态词隐藏#/industry=。数字是将要更改的id,.html将显示为简单的html页面根据不可能重写sharp(#),因为它仅在上可用client@SergioIvanuzzo它在重写规则的
模式下不起作用,但替换可以重定向到包含#的URL。这就是他想要做的。他并不是在试图匹配这个#。您还可以使用
NE
标志来保留URL。