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 将字符替换为“/&引用;在htaccess中_.htaccess_Replace_Subdirectory - Fatal编程技术网

.htaccess 将字符替换为“/&引用;在htaccess中

.htaccess 将字符替换为“/&引用;在htaccess中,.htaccess,replace,subdirectory,.htaccess,Replace,Subdirectory,我正在使用一个特定的脚本,它只识别定制页面的单个文件夹,这迫使我将所有tpl文件保存在那里,文件名类似于mydomain.com/a=cust&page=books.example 我已经使用rewritecond和rewriterule从url中删除了查询字符串,并在url中添加了.html。现在它们看起来像mydomain.com/books.example.html htaccess中是否有将文件名字符替换为“/”的选项? 我需要htaccess自动找到文件名中定义的字符,并在URL中替换

我正在使用一个特定的脚本,它只识别定制页面的单个文件夹,这迫使我将所有tpl文件保存在那里,文件名类似于mydomain.com/a=cust&page=books.example

我已经使用rewritecond和rewriterule从url中删除了查询字符串,并在url中添加了.html。现在它们看起来像mydomain.com/books.example.html

htaccess中是否有将文件名字符替换为“/”的选项? 我需要htaccess自动找到文件名中定义的字符,并在URL中替换为/以构建虚拟文件夹。(我使用的是一个特定脚本,无法在其中创建子文件夹)。 例如,文件名为: cat.books.name.tpl或cat.books.name.html 我希望.htaccess将“.”替换为“/”(或任何其他字符,如果有): mydomain.com/cat/books/name/

的可能重复项