有可能与Apache的RewriteEngine叙述做到以下几点,怎么办?
这是环境:
domain.com 有一个文件夹包含一个 index.html的页,htaccess的设置剥离文件,以便域。 COM /文件夹/ 打开 domain.com/folder/index.html
现在我需要做到的,是显示的 domain.com/folder / 的内容(的index.html),因为它来自 domain.com/virtualfolder / ,其中< STRONG> virtualfolder 不存在与该URL必须显示为 domain.com/virtualfolder /
我希望我写的这是可以理解的。
非常感谢你。
解决方案 &LT; IfModule mod_rewrite.c&GT;
RewriteEngine叙述上
重写规则^虚拟文件夹/(.*)$文件夹/ $ 1 [QSA]
&LT; / IfModule&GT;
Is it possible with Apache's RewriteEngine to do the following, and how?
This is the environment:
domain.com has a folder that contains a index.html page, htaccess is set to strip files so domain.com/folder/ opens domain.com/folder/index.html
Now what i need to achieve is display domain.com/folder/ content (the index.html) as it comes from domain.com/virtualfolder/ where virtualfolder does not exist and the url has to show as domain.com/virtualfolder/
I hope what i wrote it is understandable.
Thank you very much
解决方案<IfModule mod_rewrite.c>
RewriteEngine On
RewriteRule ^virtual-folder/(.*)$ folder/$1 [QSA]
</IfModule>
上一篇:如何让CakePHP的2.X的子目录出现在根(与mod_rewrite的htaccess的)?出现在、子目录、CakePHP、mod_rewrite
下一篇:htaccess的UTF-8的.html,的.css,.js文件编码 - 最新最好的方法是什么?最好的、文件、方法、最新