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 如何对文件夹中的文件使用mod_rewrite?_.htaccess_Mod Rewrite - Fatal编程技术网

.htaccess 如何对文件夹中的文件使用mod_rewrite?

.htaccess 如何对文件夹中的文件使用mod_rewrite?,.htaccess,mod-rewrite,.htaccess,Mod Rewrite,我正在尝试创建以下url: http://jawapa.bl.ee/ee/profiles/index.html?/jawapa 像这样: http://jawapa.bl.ee/ee/profiles/?/jawapa 我尝试过几种不同的选择,但没有一种有效。有人建议研究mod\u rewrite。我做到了,并提出了以下建议: RewriteEngine on RewriteRule .* /ee/profiles/index.html 我对mod_rewrite一点也不熟悉,所以我不知道为

我正在尝试创建以下url:

http://jawapa.bl.ee/ee/profiles/index.html?/jawapa

像这样:

http://jawapa.bl.ee/ee/profiles/?/jawapa

我尝试过几种不同的选择,但没有一种有效。有人建议研究
mod\u rewrite
。我做到了,并提出了以下建议:

RewriteEngine on RewriteRule .* /ee/profiles/index.html

我对mod_rewrite一点也不熟悉,所以我不知道为什么它不起作用。在进一步研究之后,我一直看到对名为
httpd.conf
的文件的引用。我在我的系统里什么地方都看不到那个文件。这是我可以创建的吗?

您可以在
/ee/.htaccess
中使用此规则:

RewriteEngine on
RewriteBase /ee/

RewriteRule ^profiles/?$ profiles/index.html [L]

啊,谢谢!!我不知道您可以将自己的.htaccess添加到另一个文件夹中。