Apache 通过mod_重写删除url中的文件夹名称
我有一个文件夹结构Apache 通过mod_重写删除url中的文件夹名称,apache,.htaccess,mod-rewrite,Apache,.htaccess,Mod Rewrite,我有一个文件夹结构 /root /test/ /hk/ index.html /cn/ index.html 我想当我访问www.example.com.hk/test/hk/index.html时,它会显示www.example.com.hk/test/index.html和www.example.com.cn/test/cn/index.html,它会显示www.example.com.cn/test/index.html 在.htacce
/root
/test/
/hk/
index.html
/cn/
index.html
我想当我访问www.example.com.hk/test/hk/index.html
时,它会显示www.example.com.hk/test/index.html
和www.example.com.cn/test/cn/index.html
,它会显示www.example.com.cn/test/index.html
在.htaccess中我应该做什么?请描述一下细节。谢谢 如果在.htaccess文件中使用类似的内容,我认为问题应该得到解决:
RewriteRule ^(.*)?/(.*)$ /$1/$2 [L,NC,QSA]
请同时发布您的htaccess,以便我们可以查看出了什么问题