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 rewrite.php到.html_.htaccess_Mod Rewrite_Url Rewriting - Fatal编程技术网

.htaccess Htaccess rewrite.php到.html

.htaccess Htaccess rewrite.php到.html,.htaccess,mod-rewrite,url-rewriting,.htaccess,Mod Rewrite,Url Rewriting,htaccess重写: 所以我想从这个url: strapgua.com/index/product.php?title=Calfskin to strapgua.com/index/Calfskin.html strapgua.com/index/product.php?title=Calfskin到strapgua.com/index/Calfskin.html 这是可能的还是我错过了什么 我尝试的脚本当然不起作用: Options +FollowSymLinks RewriteE

htaccess重写:

所以我想从这个url:

strapgua.com/index/product.php?title=Calfskin to strapgua.com/index/Calfskin.html strapgua.com/index/product.php?title=Calfskin到strapgua.com/index/Calfskin.html 这是可能的还是我错过了什么

我尝试的脚本当然不起作用:

Options +FollowSymLinks RewriteEngine On RewriteRule ^([^/]*)\.html$ /index/product.php?title=$1 [L] 选项+FollowSymLinks 重新启动发动机 重写规则^([^/]*)\.html$/index/product.php?title=$1[L] 你差点就成功了

您需要在
.htaccess
中使用的所有内容如下:

RewriteEngine On
RewriteRule ^index/([^/]*)\.html$ /index/product.php?title=$1 [L]

只需确保在测试之前清除缓存即可。

没问题,很高兴我能提供帮助:)