.htaccess 如何对文件夹中的文件使用mod_rewrite?
我正在尝试创建以下url:.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一点也不熟悉,所以我不知道为
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添加到另一个文件夹中。